时间:2021-07-01 10:21:17 帮助过:9人阅读
本文实例为大家分享了Android九宫格图片展示的具体代码,供大家参考,具体内容如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>换肤</title> <link rel="stylesheet" href="base.css"> <link rel="stylesheet" href="spring.css"> <script src="change.js"></script> </head> <body> <header> <span>季节</span> <button>换肤</button> </header> <p class="main"> </p> </body> </html>
基本样式文件
header{
position: absolute;
top:0px;
width:1366px;
height: 60px;
text-align: center;
}
header>span{
line-height: 60px;
}
header>button{
width:60px;
height:45px;
position: absolute;
right:30px;
margin-top:8px;
}
.main{
margin-top: 60px;
width:1366px;
height:600px;
}spring.css文件
html,body{
padding: 0px;
margin: 0px;
}
header{
background-color: #C0FF3E;
}
.main{
background: url(img/spring.jpg) no-repeat;
background-size: 1366px 600px;
}summer.css文件
html,body{
padding: 0px;
margin: 0px;
}
header{
background-color: #76EE00;
}
.main{
background: url(img/summer.jpg) no-repeat;
background-size: 1366px 600px;
}change,js文件
主要是取得link标签对象,替换link里面的属性href

相关推荐:
实例详解jQuery基于cookie实现换肤功能
jQuery+jQuery.cookie.js插件实现换肤功能的示例代码
如何实现网页换肤效果
以上就是详解js Dom实现换肤效果的详细内容,更多请关注Gxl网其它相关文章!