<!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>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<title>title>
<style type="text/css">
.box {
width: 100pxheight: 100pxposition: relative
}
.box a {
width: 100pxheight: 100pxdisplay: blockposition: absolutetop: 0left:0background: #ffffilter:alpha(opacity=0)/* IE */ opacity:0)/* FF */
}
.box a:hover {
width: 100pxheight: 100pxdisplay: blockbackground: url(111.jpg) no-repeat center centerfilter:alpha(opacity=100)opacity:1
}
CSS3代码
随着HTML5/CSS3技术日趋成熟,现如今被越来越多的网站广泛的运用。模板之家代码频道为大家收集整理最新的CSS3按钮代码,CSS3菜单代码,CSS3特效代码等供大家学习交流,好的代码是学习进步的基石同时也可以在项目中得以运用。
button{width:70px
height:30px
color:#fff
text-align: center
background-color:#c00
color:#fff
line-height: 28px
border-radius:15px
border:0
outline: 0
transition: background 0.2s
}
button:hover{
background:#666
} <button>Go</button>