Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2552309
  • 博文数量: 315
  • 博客积分: 3901
  • 博客等级: 少校
  • 技术积分: 3640
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-08 15:32
个人简介

知乎:https://www.zhihu.com/people/monkey.d.luffy Android高级开发交流群2: 752871516

文章分类

全部博文(315)

文章存档

2019年(2)

2018年(1)

2016年(7)

2015年(32)

2014年(39)

2013年(109)

2012年(81)

2011年(44)

分类: Web开发

2015-07-07 16:28:29

selector.cssselector_span.html




slector_span.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>selector_span.html</title>

    <meta http-equiv="keywords" content="HuangLei_LEGO,NetNut,四川">
    <meta http-equiv="description" content="css_js_span学习">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!-- 外部css -->
    <link rel="stylesheet" type="text/css" href="selector.css">
<!-- 内部css -->
<style type="text/css">
.style1
{
font-size: 30px; 
color: blue;
font-weight: bold;
font-sytle: normal;
text-decoration: underline;
}
/**图片滤镜*/
a:link img
{
-webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
    filter: gray;
}
/**鼠标滑过滤镜*/
a:hover img
{
-webkit-filter: grayscale(0%);
    -moz-filter: grayscale(0%);
    -ms-filter: grayscale(0%);
    -o-filter: grayscale(0%);
    filter: grayscale(0%);
    filter: "";
}
</style>
  </head>
  
  <body>
    <span class="style1">不能吃辛辣食物</span> </br> <!-- 内部css -->
    <span class="style0">不能吃热性水果</span> </br> <!-- 外部css -->
    <span id="style2">不能吃牛羊肉发物</span> </br> <!-- 外部id选择器 -->
    
    <a href="#">  </br></br>
    
    <a href="#"><img src="img/1.jpg" weight=200 height=100 title="1.jpg"/></a>
    <a href="#"><img src="img/2.jpg" weight=200 height=100 title="图片信息"/></a>
    <a href="#"><img src="img/3.jpg" weight=200 height=100 title="图片信息"/></a>
    <a href="#"><img src="img/4.jpg" weight=200 height=100 title="图片信息"/></a>
    <a href="#"><img src="img/5.jpg" weight=200 height=100 title="图片信息"/></a>
  </body>
</html>

selector.css

/**类选择器*/
.style0
{
 font-size: 30px;
 color: blue;
 font-weight: bold;
 font-sytle: normal;
 text-decoration: underline;
}
/**id选择器*/
#style2
{
 font-size: 30px;
 font-weight: bold;
 background-color: red;
}
/**html选择器*/
body
{
 color: orange;
 background-color: black;
}


/**---->html选择器-CSS :link 选择器*/
a:link
{
 text-decoration: none;
}
a:hover
{
 text-decoration: underline;
}
a:visited
{
 color : red;
}
阅读(1290) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~