Chapter 2. HTML---CSS样式表
2016-05-21 16:00
507 查看
源代码:
css样式表:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CSS样式表</title> <style type="text/css"> .pp{font-size:24px; background-color:#999; color:#F00;} </style> <link href="Untitled-2.css" rel="stylesheet" type="text/css" /> </head> <body> <p style="font-size:18px">内联样式表</p> <div class="pp">内嵌样式表</div> <div id="ppp">外部样式表</div><br /> <br /> <div class="a"></div> <div class="b">并列</div> <div class="a"><aa>后代</aa></div> <br />
<a href="http://www.baidu.com/" target="_blank">百度</a> </body> </html>
css样式表:
@charset "utf-8"; /* CSS Document */ #ppp { font-size:24px; color:#F00; background-color:#CF0;} .a,.b /*并列*/ { width:400px; height:40px; border:1px solid black;} .a aa /*后代*/ {background-color:yellow; font-size:36px; text-decoration:underline; color:blue; } a:link { text-decoration:none; color:black;} a:visited { text-decoration:none; color:orange;} a:hover { text-decoration:underline; color:red;} a:active { text-decoration:underline; color:blue;}
相关文章推荐
- CSS float浮动的深入研究、详解及拓展(二)
- css样式问题,table中的td值撑开了,样式变了
- CSS float浮动的深入研究、详解及拓展 一 一 一 一 一 一 一 一
- 子元素浮动父容器高度不能自适应的CSS解决方法
- CSS float 浮动属性
- 防止DIV被撑开的CSS
- CSS之边框属性
- DIV+CSS 网页兼容性问题(IE6 IE7 IE8 IE9 火狐 chorm)
- CSS自适应布局总结
- 常用CSS
- 用DIV+CSS做网页里要设置body和*规定内容
- 这可能是史上最全的CSS自适应布局总结
- CSS盒子模型
- 原生js+css3实现图片自动切换,图片轮播
- 用Less CSS定义常用的CSS3效果函数
- 带你一周hold住HTML+CSS系列视频及相关文档
- 2.css选择器
- css样式命名导致样式“变异”的问题
- LaTeX技巧004:给文字添加下划线、波浪线等样式
- 360极速模式与兼容模式的样式