层、链接样式,css学习小结

效果图

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>层、链接样式</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body {background-color:yellow;}
a {font-family:楷体;font-weight:bold;font-size:30px;color:blue;text-decoration:none;}

#b1:hover {color:red;background-color:#99ffcc;font-size:45px;}
#b1:active {color:green;}
#b1:visited: {color:black;}
#b2:hover {color:red;text-decoration:underline;font-size:45px;}
#b2:active {color:green;}
#b2:visited: {color:white;}

.div1
{font-size:60px;position:relative;width:300px;height:200px;background-color:green;z-index:1;}

.div2
{font-size:60px;width:300px;height:200px;position:absolute;left:200px;top:15px;background-color:#eeb0b0;z-index:2;}

.div3
{position:absolute;top:100px;left:410px;width:300px;height:300px;z-index:4;list-style-image:url(2.gif);font-size:35px;font-family:楷体;color:red;}

.div4
{position:absolute;top:60px;left:360px;width:420px;height:290px;z-index:3;overflow:scroll;cursor:help;}

h1
{font-family:楷体;color:red;}

.b3
{font-size:35px;color:blue;font-weight:bold;}

#b4:hover {color:green;font-size:35px;}

#b5:hover {color:green;font-size:35px;}

.b6
{color:#ff0000;}

#div5
{list-style-image:url(2.gif);}

</style>
</head>
<body>
   <a href="http://www.baidu.com" target="_bland" id="b1">百度</a>
 <div class="div1">div1</div>
 <div class="div2">div2</div><!--要是定的上边距和下边距一样就没变化,不一样就取大的那个,这是实例-->
<h1>另一问题</h1>
<h2>这又一个样式的超链接<a href="http://www.sina.com.cn" target="_bland" id="b2">新浪</a></h2>
<div class="div4">
<img src="1.jpg">
</div>
<div class="div3">
江雪
<li>千山鸟飞绝,
<li>万径人踪灭。
<li>孤舟蓑笠翁,
<li>独钓寒江雪。
</div>
<table width="550" height="200" bgcolor="#ffdfaa">
    <tr>
 <td colspan="4" class="b3"><div id="div5"><ul><li>珠宝首饰、手表、眼镜</li></ul></div></td>
    </tr>
    <tr>
 <td><a href="#" id="b4">银饰</a></td>
 <td><a href="#" id="b4">流行饰品</a></td>
 <td><a href="#" id="b4">仿真饰品</a></td>
 <td><a href="#" id="b4">钻饰</a></td>
    </tr>
    <tr>
 <td><a href="#" id="b4">天然水晶</a></td>
 <td><a href="#" id="b5" class="b6">翡翠手表</a></td>
 <td><a href="#" id="b4">耳饰</a></td>
 <td><a href="#" id="b4">戒指</a></td>
    </tr>
   
</table>

 

</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值