Blogger Information
Blog 14
fans 0
comment 0
visits 9626
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
CSS的引入 7.3
耿玉洁的博客
Original
485 people have browsed it

CSS的引入 可以通过3种方式:内部样式 内联样式 外部引入

内部样式 实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS的引入</title>
    <style>
        /*内部样式*/
        p{
            color: green;
        }
    </style>
</head>
<body>
<p>css的简介和引入2222</p>
<p>内联样式 大于 内部样式</p>
</body>
</html>

运行实例 »

内联样式 实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS的引入</title>
</head>
<body>
<p style="color: red">css的简介和引入2222</p>
<p style="color: green">内联样式 大于 内部样式</p>
</body>
</html>

运行实例 »

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS的引入</title>
    <link rel="stylesheet" href="static/css/1.css">
</head>
<body>
<p style="color: red">css的简介和引入2222</p>
<p style="color: green">内联样式 大于 内部样式</p>
<p>1111111111111111</p>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

外部引入 实例   通过link标签

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS的引入</title>
    <link rel="stylesheet" href="static/css/1.css">
</head>
<body>
<p style="color: red">css的简介和引入2222</p>
<p style="color: green">内联样式 大于 内部样式</p>
<p>1111111111111111</p>
</body>
</html>

运行实例 »

.css文件规则

(选择器)p{          
                        color: aqua;
                        font-size: 18px;
                      }

 

 

 

Correction status:qualified

Teacher's comments:总结的不错, 其实还有更多的小技巧的
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post