移动页面之侧滑
来源:互联网 发布:同花顺手机炒股软件wp 编辑:程序博客网 时间:2024/06/05 09:49
<!DOCTYPE html>
<html>
<head>
<metacharset="utf-8">
<metaname="viewport"content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<basetarget="content" />
<scripttype="text/javascript"src="js/jquery.min.js"></script>
<linkrel="shortcut icon"href="favicon.ico">
<linkhref="css/bootstrap.min.css?v=3.3.6"rel="stylesheet">
<linkhref="css/font-awesome.min.css?v=4.4.0"rel="stylesheet">
<style>
body{
margin: 0;
padding: 0;
overflow: hidden;
}
.page{
position: absolute;
/*left: 300px;*/
width: 100%;
height: 100%;
background-color: lavender;
}
.top{
position: fixed;
width: 100%;
height: 60px;
background-color: royalblue;
z-index: 500;
}
.mybtn{
margin-top: 15px;
margin-left: 15px;
color: #FFFFFF;
font-size: 28px;
}
.mybtn:hover{
cursor: pointer;
}
.backimg{
position: absolute;
width: 100%;
height: 100%;
z-index: 1000;
background-color: black;
opacity: 0.3;
display: none;
}
.right-dh{
border: 1px solid #000000;
position: absolute;
left: -300px;
background-color: black;
width: 300px;
height: 100%;
z-index: -10;
}
.right-dh-tx{
text-align: center;
}
.right-dh-tx img{
display: block;
width: 110px;
border-radius: 50%;
border: 3px solid #FFFFFF;
margin: 100px auto 30px;
}
.right-dh-tx span{
color: #FFFFFF;
}
.cont iframe{
position: absolute;
top: 65px;
width: 100%;
height: 100%;
border: 0px;
/*background-color: brown;*/
}
.dh-btn{
margin-top: 50px;
/*border-top: 1px solid gray;*/
}
.dh-btn a{
display: block;
color: #FFFFFF;
text-decoration: none;
/*border-bottom: 1px solid gray;*/
height: 60px;
line-height: 60px;
text-indent: 20px;
}
hr{
width: 200px;
color: gainsboro;
opacity: 0.3;
margin-top: 50px;
}
</style>
<script>
$(document).ready(function(){
//侧滑按钮点击事件
$(".mybtn").click(function(){
//页面整体侧滑
$(".page").animate({
left:'300px'
});
//显示透明度div层
$(".backimg").css({
"display":"block"
});
//左侧导航右滑
$(".right-dh").animate({
left:'0px'
});
});
//还原点击事件
$(".backimg").click(function(){
//页面整体左滑动
$(".page").animate({
left:'0px'
});
//显示透明度div层隐藏
$(".backimg").css({
"display":"none"
});
//左侧导航右滑
$(".right-dh").animate({
left:'-300px'
});
});
//栏目选择事件
$(".dh-btn a").click(function(){
//页面整体左滑动
$(".page").animate({
left:'0px'
});
//显示透明度div层隐藏
$(".backimg").css({
"display":"none"
});
//左侧导航右滑
$(".right-dh").animate({
left:'-300px'
});
});
});
</script>
</head>
<body>
<!--右侧导航-->
<divclass="right-dh">
<!--右侧导航头像-->
<divclass="right-dh-tx">
<imgsrc="img/tx.jpg" />
<span>刘德华</span>
</div>
<hr />
<!--导航栏-->
<divclass="dh-btn">
<aclass="dj"href="grzl.html">
<iclass="fa fa-bars"></i> 个人资料
</a>
<ahref="zpzs.html">
<iclass="fa fa-bank"></i> 作品展示
</a>
<ahref="ysxz.html">
<iclass="fa fa-beer"></i> 艺术写真
</a>
<ahref="yyjl.html">
<iclass="fa fa-bold"></i> 演绎经历
</a>
</div>
</div>
<!--左侧界面-->
<divclass="page">
<divclass="backimg"></div>
<divclass="top">
<!--向右滑动按钮-->
<iclass="mybtn fa fa-user"></i>
</div>
<!--主要内容-->
<divclass="cont">
<iframename="content"src="shouye.html"></iframe>
</div>
</div>
</body>
</html>
<html>
<head>
<metacharset="utf-8">
<metaname="viewport"content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<basetarget="content" />
<scripttype="text/javascript"src="js/jquery.min.js"></script>
<linkrel="shortcut icon"href="favicon.ico">
<linkhref="css/bootstrap.min.css?v=3.3.6"rel="stylesheet">
<linkhref="css/font-awesome.min.css?v=4.4.0"rel="stylesheet">
<style>
body{
margin: 0;
padding: 0;
overflow: hidden;
}
.page{
position: absolute;
/*left: 300px;*/
width: 100%;
height: 100%;
background-color: lavender;
}
.top{
position: fixed;
width: 100%;
height: 60px;
background-color: royalblue;
z-index: 500;
}
.mybtn{
margin-top: 15px;
margin-left: 15px;
color: #FFFFFF;
font-size: 28px;
}
.mybtn:hover{
cursor: pointer;
}
.backimg{
position: absolute;
width: 100%;
height: 100%;
z-index: 1000;
background-color: black;
opacity: 0.3;
display: none;
}
.right-dh{
border: 1px solid #000000;
position: absolute;
left: -300px;
background-color: black;
width: 300px;
height: 100%;
z-index: -10;
}
.right-dh-tx{
text-align: center;
}
.right-dh-tx img{
display: block;
width: 110px;
border-radius: 50%;
border: 3px solid #FFFFFF;
margin: 100px auto 30px;
}
.right-dh-tx span{
color: #FFFFFF;
}
.cont iframe{
position: absolute;
top: 65px;
width: 100%;
height: 100%;
border: 0px;
/*background-color: brown;*/
}
.dh-btn{
margin-top: 50px;
/*border-top: 1px solid gray;*/
}
.dh-btn a{
display: block;
color: #FFFFFF;
text-decoration: none;
/*border-bottom: 1px solid gray;*/
height: 60px;
line-height: 60px;
text-indent: 20px;
}
hr{
width: 200px;
color: gainsboro;
opacity: 0.3;
margin-top: 50px;
}
</style>
<script>
$(document).ready(function(){
//侧滑按钮点击事件
$(".mybtn").click(function(){
//页面整体侧滑
$(".page").animate({
left:'300px'
});
//显示透明度div层
$(".backimg").css({
"display":"block"
});
//左侧导航右滑
$(".right-dh").animate({
left:'0px'
});
});
//还原点击事件
$(".backimg").click(function(){
//页面整体左滑动
$(".page").animate({
left:'0px'
});
//显示透明度div层隐藏
$(".backimg").css({
"display":"none"
});
//左侧导航右滑
$(".right-dh").animate({
left:'-300px'
});
});
//栏目选择事件
$(".dh-btn a").click(function(){
//页面整体左滑动
$(".page").animate({
left:'0px'
});
//显示透明度div层隐藏
$(".backimg").css({
"display":"none"
});
//左侧导航右滑
$(".right-dh").animate({
left:'-300px'
});
});
});
</script>
</head>
<body>
<!--右侧导航-->
<divclass="right-dh">
<!--右侧导航头像-->
<divclass="right-dh-tx">
<imgsrc="img/tx.jpg" />
<span>刘德华</span>
</div>
<hr />
<!--导航栏-->
<divclass="dh-btn">
<aclass="dj"href="grzl.html">
<iclass="fa fa-bars"></i> 个人资料
</a>
<ahref="zpzs.html">
<iclass="fa fa-bank"></i> 作品展示
</a>
<ahref="ysxz.html">
<iclass="fa fa-beer"></i> 艺术写真
</a>
<ahref="yyjl.html">
<iclass="fa fa-bold"></i> 演绎经历
</a>
</div>
</div>
<!--左侧界面-->
<divclass="page">
<divclass="backimg"></div>
<divclass="top">
<!--向右滑动按钮-->
<iclass="mybtn fa fa-user"></i>
</div>
<!--主要内容-->
<divclass="cont">
<iframename="content"src="shouye.html"></iframe>
</div>
</div>
</body>
</html>
阅读全文
0 0
- 移动页面之侧滑
- 移动页面侧滑
- 移动SEO之页面优化
- 移动页面侧滑的演示
- 移动混合开发之页面布局
- 移动开发之页面字体的应用
- 移动端web页面知识小结之页面部分
- 移动web前端开发,页面局部滑动之iscroll框架
- HTML5移动开发之路 jQueryMobile页面间参数传递
- 移动端H5页面之iphone6的适配
- 移动端H5页面之iphone6的适配
- 移动端H5页面之iphone6的适配
- HTML5移动开发之路 jQueryMobile页面间参数传递
- 移动端H5页面之iphone6的适配
- 移动开发之设计稿转换页面单位尺寸
- 移动端web页面知识小结之meta部分
- 移动端web页面知识小结之CSS部分
- 移动端H5页面之iphone6的适配
- js遍历不规则的多维数组
- 9月28号Python生物信息学数据管理
- 定位
- Maven中的库(repository)详解
- 隔壁老王,我就服你了!
- 移动页面之侧滑
- Linux权限管理
- linux下配置vscode 调试c++ 项目
- idea的mybatis的xml文件总是报警告SQL dialect is not configured
- 二叉搜索树的定义、查找、插入和删除
- json与protobuf的速度之争
- 真正理解linux的inode
- ASP.NET 实现FORM认证的一些使用技巧
- 关于input中type为number的坑