最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

javascript实现圣旨卷轴展开效果的示例代码分享

来源:懂视网 责编:小OO 时间:2020-11-27 20:23:41
文档

javascript实现圣旨卷轴展开效果的示例代码分享

效果图。代码如下:<。--左转轴-->;<;p class=";r-pic-index";>;<;/p>;<。--右转轴-->;<;p class=";l-bg-index";>;<;/p>;<;p class=";r-bg-index";>;<;/p>;<;p class=";main-index";>;<;
推荐度:
导读效果图。代码如下:<。--左转轴-->;<;p class=";r-pic-index";>;<;/p>;<。--右转轴-->;<;p class=";l-bg-index";>;<;/p>;<;p class=";r-bg-index";>;<;/p>;<;p class=";main-index";>;<;
本文主要介绍了javascript实现圣旨卷轴展开效果的示例代码。具有很好的参考价值。下面跟着小编一起来看下吧

效果图:

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="jQuery 3.1.1.js"></script>
<title>诏书</title>
<style type="text/css">
body,ul,li,p,h1,h2,h3,h4,h5{
 margin:0;
 padding:0;
 font-size:100%;
}
body{
 font-family: 'Microsoft YaHei UI', 'Microsoft YaHei', SimSun, 'Segoe UI', Tahoma, Helvetica, Sans-Serif;
 font-size: 50px;
 background: #6f0b02;
}
img{
 border:0;
}
.content{
 position: relative;
 margin: 40px 0 0 -21px;
 width: 900px;
 height: 460px;
}
.l-pic-index{
 position: absolute;
 left: 400px;
 top: 1px;
 z-index:2;
 width:50px;
 height:460px;
 background: url("images/11.png") no-repeat right 0;
}
.r-pic-index{
 position: absolute;
 right: 400px;
 top: 0;
 z-index: 2;
 width:50px;
 *width:82px;
 height:460px;
 background: url("images/11.png") no-repeat left 0;
}
.l-bg-index{
 position: absolute;
 top: 20px;/*中间转轴位置*/
 left: 430px;
 z-index: 1;
 width: 25px;
 height: 459px;
 background: url("images/bg1.png") right 0 no-repeat;
}
.r-bg-index{
 position: absolute;
 top: 20px;
 right: 430px;
 z-index: 1;
 width: 25px;
 height: 459px;
 background: url("images/bg1.png") 0 0 no-repeat;
}
.main-index{
 display: none;
 overflow: hidden;
 zoom:1;
 position: absolute;
 z-index: 5;
 width:700px;
 height:280px;
 left:90px;
 top:90px;
 color: #2e2e2e;
}
.intro-text{
 margin: 10px 0 0 44px;
 line-height: 2;
 text-indent: 3px;
}
</style>
</head>
<body>
<p class="content">
 <p class="l-pic-index"></p><!--左转轴-->
 <p class="r-pic-index"></p><!--右转轴-->
 <p class="l-bg-index"></p>
 <p class="r-bg-index"></p>
 <p class="main-index">
 <!-- <h1 class="title"><img src="./img/intro-title.png" alt=""></h1> -->
 <p class="intro-text">
 奉天承运皇帝诏曰:下班没?
 </p>
 </p>
 </p>
</body>
<script>
 window.onload = function(){
 //卷轴展开效果
 $(".l-pic-index").animate({'left':'50px','top':'-5px'},1450);
 $(".r-pic-index").animate({'right':'-60px','top':'-5px'},1450);
 $(".l-bg-index").animate({'width':'433px','left':'73px'},1500);
 $(".r-bg-index").animate({'width':'433px','right':'-38px'},1500,function(){
 $(".main-index").fadeIn(800);
 });
 }
</script>
</html>

文档

javascript实现圣旨卷轴展开效果的示例代码分享

效果图。代码如下:<。--左转轴-->;<;p class=";r-pic-index";>;<;/p>;<。--右转轴-->;<;p class=";l-bg-index";>;<;/p>;<;p class=";r-bg-index";>;<;/p>;<;p class=";main-index";>;<;
推荐度:
标签: 分享 实现 js
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top