Home > Web Front-end > HTML Tutorial > CSS 行内样式 页内样式 外部样式_html/css_WEB-ITnose

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 11:17:25
Original
1335 people have browsed it

行内标签:

<!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>
Copy after login

图片

业内标签:

<!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>
Copy after login

图片:

外部样式:

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

图片:

<!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>
Copy after login

图片:

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template