码迷,mamicode.com
首页 > Web开发 > 详细

CSS的引入方式

时间:2018-11-22 16:07:28      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:段落   round   weight   pre   char   font   lin   index   dex   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        span{
            color: yellow;
        }
    </style>
    <link rel="stylesheet" href="./index.css">
    <style>
        @import url(./index.css);
    </style>
</head>
<body>
<!--
1 行内样式 直接在标签内定义样式
2 内接样式 在head里定义style
3 外接样式
    3.1 链接式
    <link rel="stylesheet" href="./index.css">
    3.2 导入式
    <style>
        @import url(index.css);
    </style>
-->
    <div>
        <p style="color: green;">我是一个段落</p>
    </div>

    <div>
        <div>
            <span>我是另一个段落</span>
            <a href="#">火影忍者</a>
        </div>
    </div>
</body>
</html>

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
span{
color: yellow;
}
</style>
<link rel="stylesheet" href="./index.css">
<style>
@import url(./index.css);
</style>
</head>
<body>
<!--
1 行内样式 直接在标签内定义样式
2 内接样式 在head里定义style
3 外接样式
3.1 链接式
<link rel="stylesheet" href="./index.css">
3.2 导入式
<style>
@import url(index.css);
</style>
-->
<div>
<p style="color: green;">我是一个段落</p>
</div>

<div>
<div>
<span>我是另一个段落</span>
<a href="#">火影忍者</a>
</div>
</div>
</body>
</html>

CSS的引入方式

标签:段落   round   weight   pre   char   font   lin   index   dex   

原文地址:https://www.cnblogs.com/Nopeeee/p/10001350.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!