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

css样式写法

时间:2018-12-08 11:20:20      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:tor   height   set   col   title   body   css   head   顺序   

 1 <!doctype html>
 2 <html>
 3     <head>
 4           <meta charset="UTF-8">
 5           <meta name="Generator" content="EditPlus?">
 6           <meta name="Author" content="">
 7           <meta name="Keywords" content="">
 8           <meta name="Description" content="">
 9           <title>Document</title>
10           <style>
11             p{
12                 width:200px;
13                 height:20px;
14                 background:gold;
15             }
16             div{
17                 width:300px;
18                 height:30px;
19                 background:skyblue;
20             }
21           </style>
22           <link rel="stylesheet" type="text/css" href="csss/cssss.css"/>
23           <!--
24             link标签不可放到style中,标签不能放到标签中;
25             样式的三种写法:
26                 1:style标签,头部样式;
27                 2:link标签链接独立的css文件;
28                 3:在标签中添加style属性;
29                 优先级: 内联样式>外部样式(link和style看顺序)
30           -->
31     </head>
32     <body>
33         <p>你是猪</p>
34         <div style="width:100px;height:10px;background:pink">我是人</div>
35         <span>他也是猪,不过人家是小猪佩奇!</span>
36     </body>
37 </html>

 

css样式写法

标签:tor   height   set   col   title   body   css   head   顺序   

原文地址:https://www.cnblogs.com/soTired/p/10086333.html

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