首页 >web前端 >html教程 >CSS 行内样式 页内样式 外部样式_html/css_WEB-ITnose

CSS 行内样式 页内样式 外部样式_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 11:17:251307浏览

行内标签:

<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title></title></head><!--style="background-color: red;"--><body style="background-color: red;"><!--行内样式-->    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <p style="font-size: 40px; color: yellow;">旭宝爱吃鱼</p>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div>    <div style="font-size: 30px; color: red; background-color: green;">旭宝爱吃鱼</div></body></html>

图片

业内标签:

<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title></title>    <!--      css遵循一个规律:      1.就近原则      2.叠加原则    -->    <style>        div{           color: purple;           font-size: 40px;           background-color: yellowgreen;        }        p{            color: deeppink;            font-size: 50px;        }    </style>    <link href="css/index.css" rel="stylesheet"></head><body>   <div style="color: hotpink; background-color: red;">旭宝爱吃鱼</div>   <div>旭宝爱吃鱼</div>   <div>旭宝爱吃鱼</div>   <div>旭宝爱吃鱼</div>   <div>旭宝爱吃鱼</div>   <p>旭宝爱吃鱼</p>   <p>旭宝爱吃鱼</p>   <p>旭宝爱吃鱼</p>   <p>旭宝爱吃鱼</p></body></html>

图片:

外部样式:

div{    color: brown;    font-size: 50px;}p{    background-color: yellow;    color: darkgreen;    font-size: 39px;}

图片:

<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title></title>    <link rel="stylesheet" href="css/index.css"></head><body>   <div>旭宝爱吃鱼</div>   <p>旭宝爱吃鱼</p></body></html>

图片:

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn