<!doctype html>
<html>
<head>
<title>练习</title>
<meta charset="utf-8"/>
<base target="_blank">
<link rel="shortcut icon" type="text/css" href="logo.ico">
<style type="text/css">
.a1{
background-color: #fff;
width: 200px;
height: 270px;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
margin-top: 15px;
border-radius: 1%;
color: #000;
font-size: 18px;
box-shadow: 1px 1px 3px #ccc;
}
img{
border-top-left-radius: 1%;
border-top-right-radius: 1%;
}
a{
text-transform: none;
text-decoration: none;
}
</style>
<script>
function over(x){
x.style.opacity="0.75";
x.style.box-shadow="0px 0px 0px #fff";//加了这行,鼠标的移入移出效果就无效。没有这行就一切正常。
}
function out(x){
x.style.opacity="1";
x.style.box-shadow="1px 1px 3px #ccc";//加了这行,鼠标的移入移出效果就无效。没有这行就一切正常。
}
</script>
</head>
<body style="background-color: #eee; margin: 0px; font-family: Microsoft Yahei;">
<div style="text-align: center;">
<div style="width: 1285px; display: inline-block; margin-top: 30px; text-align: center;">
<div style="width: 100%; text-align: left;">
<a href="http://www.baidu.com" class="a1" onmouseover="over(this)" onmouseout="out(this)" >
<img src="http://tupian.enterdesk.com/2013/mxy/12/11/4/3.jpg" style="width:200px; height:200px; ">
<p style="text-align: center;">一二三四五</p></a>
<a href="http://www.baidu.com" class="a1" onmouseover="over(this)" onmouseout="out(this)" >
<img src="http://tupian.enterdesk.com/2013/mxy/12/11/4/3.jpg" style="width:200px; height:200px; ">
<p style="text-align: center;">一二三四五</p></a>
<a href="http://www.baidu.com" class="a1" onmouseover="over(this)" onmouseout="out(this)" >
<img src="http://tupian.enterdesk.com/2013/mxy/12/11/4/3.jpg" style="width:200px; height:200px; ">
<p style="text-align: center;">一二三四五</p></a>
</div>
</div>
</div>
</body>
</html>