翻页源码html
‘壹’ 怎么用html做一个左右翻页的按钮,而且超链接到另一个页面
先在网上找的按钮的图标
然后代码是:
<a href="链接"><img src="左翻页图标的路径"></a>
<a href="链接"><img src="右翻页图标的路径"></a>
‘贰’ 菜鸡求教 html翻页效果
1,快速解决你问题的方法
你下的模版页码上a标签
<a href="#">2</a>
设置为空了,如果你想让它模拟跳转的效果
可以将href='#'修改为href="xxx.html"
xxx.html以你自己命名的文件为准,文件夹下要有这个文件
然后再xxx.html里面设置<a href="index.html">页码1</a>
这样两个页面就可以来回跳了。
以上是静态页面之间的跳转,实质上的网页应用以更
高级的方式跳转
2,静态切换式的分页原理
在页面潜伏5个不同的DIV块。
显示其中之1,隐藏其他4个。
利用javascript代码,为页码添加点击事件,当页码改变的时候
显示指定的块style="display:''",影藏其他4个块style="display:none",达到视觉上的分页效果。
3,利用服务器端语言或者AJAX的动态分页
这个才算真正的分页了。
服务器驱动,比如php语言,点击页码时传递分页参数,服务器刷新整个页面。
(页面是刷新了整个页面,但是只改变了分页区域的显示,所以视觉上的差异是部分)
AJAX ,JAVASCRIPT利用异步更新获取其他新的分页区域,等到获取完毕时,只局部刷新
需要更新的区域,所以不会有视觉抖动,整个页面也不会被刷新
PS:最近话说得有点多。。。大概开发太寂寞。。。
‘叁’ 求一款HTML网页分页翻页代码
PHP的
<?php
include_once("../../config/config.php");
$conn = mysql_connect ($DBhost, $DBuser, $DBpaswd) or die("fail to connect to db");
mysql_select_db($DBname) or die("fail to select db");
$str = $_GET['page'];
if($str < 1)
{
$str = "1";
}
$page = intval($str);//which page
$msg_count = mysql_query("select count(id) as rscont from message");
$rs_count = 0;
while($ro = mysql_fetch_object($msg_count))
{
$rs_count = $ro->rscont;
}//total data
$pagesize=5; //total page
$sql="select * from message order by con_time DESC limit ".($page-1) * $pagesize.",".$pagesize."";
mysql_query("set names 'utf8'");
$result=mysql_query ($sql) or die("fail to query");
$pagecount=0;
if(($rs_count/$pagesize)!=0)
{
$pagecount=intval($rs_count/$pagesize)+1;
}
else
{
$pagecount=$rs_count/$pagesize;
}
if($page<1)
{
$page=1;
}
else
{
if($page>$pagecount)
{
$page=$pagecount;
}
}
if (mysql_num_rows($result)>0){
$msg_no = 1; //message number. TBD,num should be plus after change page
while($row=mysql_fetch_object($result)){
?>
<div id="each-content">
<div id="title">
<div id="content-header" >
<span>#:<?php echo "$msg_no" ?></span>
<span class="content-name">By: <?php echo "$row->username" ?></span>
<span class="content-time">Create at: <?php echo "$row->con_time" ?></span>
</div>
</div>
<div id="content-body">
<div class="DivUnderline">
<table width="100%"><tr><td>Title:<span id="msg_title_"><?php echo "$row->con_title" ?></span></td>
<td style="text-align:right">
<a name="msg_updates_<?php echo "$row->id" ?>" style="display:none" href="message_update.php?id=<?php echo "$row->id" ?>">[update]</a>
<a name="msg_deletes" style="display:none" href="message_delete.php?id=<?php echo "$row->id" ?>">[delete]</a>
</td></tr></table>
<hr>
</div>
<div class="DivNotification"><?php echo "$row->content"?></div>
</div>
<div id="reply">
<span class="content-name"> Admin replay:<br/></span><span id="reply-content"><?php echo "$row->reply" ?></span>
</div>
</div>
<?php
$msg_no++;
}
}
else
{
?>
<span>There is no message in this page!</span>
<?php
}
//show update button and delete button
include "message_buttons.php";
?>
<div id="fenye">
Current page[<?php echo $page."/".$pagecount ?>]
<a href="message_index.php?page=1">[First page]</a>
<a href="message_index.php?page=<?php echo $page-1 ?>">[Last page]</a>
<a href="message_index.php?page=<?php echo $page+1 ?>">[Next page]</a>
<a href="message_index.php?page=<?php echo $pagecount ?>">[End]</a>
</div>
‘肆’ 求FLASH翻页源代码
发个素材站给你 这里好多flash 效果 你说的翻页的里边也有 放大缩小的也有 具体哪页忘记了 呵呵 有名字的…… 下载也很简单 直接点击右键另存为 就保存了
‘伍’ html中文字如何翻页
以下是代码,如果和你要求不符,发站内消息给我
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>标题一</title>
<script>
function Menu(term){
if(term.style.display=="none"){
Menu_1.style.display="none";
Menu_2.style.display="none";
Menu_3.style.display="none";
term.style.display="";
}}
</script>
</head>
<body>
<p><a href="###" onclick="Menu(Menu_1)">标题一</a>,<a href="###" onclick="Menu(Menu_2)">标题二</a>,<a href="###" onclick="Menu(Menu_3)">标题三</a></p>
<div style="position: absolute; width: 100px; height: 100px; z-index: 1;background-color:red;" id="Menu_1">我是标题一内的内容
</div>
<div style="display:none;position: absolute; width: 100px; height: 100px; z-index: 1;background-color:green;" id="Menu_2">我是标题二内的内容
</div>
<div style="display:none;position: absolute; width: 100px; height: 100px; z-index: 1;background-color:black;color:red;" id="Menu_3">我是标题三内的内容
</div>
</body>
</html>
‘陆’ HTML图片翻页效果怎么做! 这样的源码谁有,帮我复制一个
js实现如下
var $$ = function (id) {
return "string" == typeof id ? document.getElementById(id) : id;
};
var Extend = function (destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
var CurrentStyle = function (element) {
return element.currentStyle || document.defaultView.getComputedStyle(element, null);
}
var Bind = function (object, fun) {
var args = Array.prototype.slice.call(arguments).slice(2);
return function () {
return fun.apply(object, args.concat(Array.prototype.slice.call(arguments)));
}
}
var forEach = function (array, callback, thisObject) {
if (array.forEach) {
array.forEach(callback, thisObject);
} else {
for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); }
}
}
var Tween = {
Quart: {
easeOut: function (t, b, c, d) {
return -c * ((t = t / d - 1) * t * t * t - 1) + b;
}
},
Back: {
easeOut: function (t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
}
},
Bounce: {
easeOut: function (t, b, c, d) {
if ((t /= d) < (1 / 2.75)) {
return c * (7.5625 * t * t) + b;
} else if (t < (2 / 2.75)) {
return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
} else if (t < (2.5 / 2.75)) {
return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
} else {
return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
}
}
}
}
//容器对象,滑动对象,切换数量
var SlideTrans = function (container, slider, count, options) {
this._slider = $$(slider);
this._container = $$(container); //容器对象
this._timer = null; //定时器
this._count = Math.abs(count); //切换数量
this._target = 0; //目标值
this._t = this._b = this._c = 0; //tween参数
this.Index = 0; //当前索引
this.SetOptions(options);
this.Auto = !!this.options.Auto;
this.Duration = Math.abs(this.options.Duration);
this.Time = Math.abs(this.options.Time);
this.Pause = Math.abs(this.options.Pause);
this.Tween = this.options.Tween;
this.onStart = this.options.onStart;
this.onFinish = this.options.onFinish;
var bVertical = !!this.options.Vertical;
this._css = bVertical ? "top" : "left"; //方向
//样式设置
var p = CurrentStyle(this._container).position;
p == "relative" || p == "absolute" || (this._container.style.position = "relative");
this._container.style.overflow = "hidden";
this._slider.style.position = "absolute";
this.Change = this.options.Change ? this.options.Change :
this._slider[bVertical ? "offsetHeight" : "offsetWidth"] / this._count;
};
SlideTrans.prototype = {
//设置默认属性
SetOptions: function (options) {
this.options = {//默认值
Vertical: true, //是否垂直方向(方向不能改)
Auto: true, //是否自动
Change: 0, //改变量
Duration: 30, //滑动持续时间
Time: 10, //滑动延时
Pause: 3000, //停顿时间(Auto为true时有效)
onStart: function () { }, //开始转换时执行
onFinish: function () { }, //完成转换时执行
Tween: Tween.Quart.easeOut//tween算子
};
Extend(this.options, options || {});
},
//开始切换
Run: function (index) {
//修正index
index == undefined && (index = this.Index);
index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
//设置参数
this._target = -Math.abs(this.Change) * (this.Index = index);
this._t = 0;
this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]);
this._c = this._target - this._b;
this.onStart();
this.Move();
},
//移动
Move: function () {
clearTimeout(this._timer);
//未到达目标继续移动否则进行下一次滑动
if (this._c && this._t < this.Duration) {
this.MoveTo(Math.round(this.Tween(this._t++, this._b, this._c, this.Duration)));
this._timer = setTimeout(Bind(this, this.Move), this.Time);
} else {
this.MoveTo(this._target);
this.Auto && (this._timer = setTimeout(Bind(this, this.Next), this.Pause));
}
},
//移动到
MoveTo: function (i) {
this._slider.style[this._css] = i + "px";
},
//下一个
Next: function () {
this.Run(++this.Index);
},
//上一个
Previous: function () {
this.Run(--this.Index);
},
//停止
Stop: function () {
clearTimeout(this._timer); this.MoveTo(this._target);
}
};
var nums = [], timer, n = $$("idSlider2").getElementsByTagName("li").length;
function AddNum(i) {
var num = $$("idNum").appendChild(document.createElement("li"));
num.innerHTML = i--;
num.onmouseover = function () {
timer = setTimeout(function () { num.className = "on"; st.Auto = false; st.Run(i); }, 200);
}
num.onmouseout = function () { clearTimeout(timer); num.className = ""; st.Auto = true; st.Run(); }
nums[i] = num;
}
if(n>0){
st = new SlideTrans("idContainer2", "idSlider2", n, {
onStart: function () {//设置按钮样式
forEach(nums, function (o, i) { o.className = st.Index == i ? "on" : ""; })
}
});
for (var i = 1; i <= n; AddNum(i++)) { };
st.Run();
}
调用方法
<div style="height: 278px; width: 350px; overflow:hidden;" id="idContainer2">
<ul id="idSlider2">
<ul>
<li>
<img src="/UploadFiles/yyxx/2011/5/201105111319131472.jpg" border="0" width="350" height="250">
</li>
<li>
<img src="/UploadFiles/yyxx/2011/5/201105111319131472.jpg" border="0" width="350" height="250">
</li>
<li>
<img src="/UploadFiles/yyxx/2011/5/201105111319131472.jpg" border="0" width="350" height="250">
</li>
<li>
<img src="/UploadFiles/yyxx/2011/5/201105111319131472.jpg" border="0" width="350" height="250">
</li>
<li>
<img src="/UploadFiles/yyxx/2011/5/201105111319131472.jpg" border="0" width="350" height="250">
</li>
</ul>
</ul>
<ul class="num" id="idNum">
</ul>
<script type="text/javascript" src="js/PicFlash.js">
</script>
</div>
css 样式:
#idContainer2
{
text-align:left;
}
#idContainer2 ul, #idContainer2 li
{
list-style: none;
margin: 0;
padding: 0;
}
#idContainer2 .num
{
position: absolute;
right: 5px;
bottom: 5px;
font: 12px/1.5 tahoma, arial;
height: 18px;
}
#idContainer2 .num li
{
float: left;
color: #d94b01;
text-align: center;
line-height: 16px;
width: 16px;
height: 16px;
font-family: Arial;
font-size: 11px;
cursor: pointer;
margin-left: 3px;
border: 1px solid #f47500;
background-color: #fcf2cf;
}
#idContainer2 .num li.on
{
line-height: 18px;
width: 18px;
height: 18px;
font-size: 14px;
margin-top: -2px;
background-color: #ff9415;
font-weight: bold;
color: #FFF;
}
‘柒’ 求一条在html中可以让内容翻页的JS代码
一般正常情况都是后台来实现的。 前端只要做这个样式就好
因为本身这东西如果数据量大 ,你加载网页会非常的卡 ,不建议使用
‘捌’ html 如何点击屏幕 翻页
看你用的是什么网站程序了, 然后调用那个下一页的标签就行了
‘玖’ HTML如何实现数字时钟垂直翻页切换代码
http://www.xwcms.net/js/rqsj/24313.html http://www.xwcms.net/js/rqsj/83318.html http://www.xwcms.net/js/rqsj/17874.html 这是三种你需要的效果,如果不合适的话你再在这个网站里面找一下,还有好多呢,我怕回答被删了,不敢弄太多的网址,望采纳
‘拾’ html5上下滑动“翻页”实现,是真正的翻页
HTML5手机上下滑动翻页特效是一款手机移动端触屏滑动效果实现完整代码如下:
1、html5页面代码
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HTML5手机页面触屏滑动上下翻页特效</title>
<meta charset="utf-8">
<meta name="apple-touch-fullscreen" content="YES">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="pragram" content="no-cache">
<link rel="stylesheet" type="text/css" href="./hamer_files/main.css">
<link rel="stylesheet" type="text/css" href="./hamer_files/endpic.css">
<script type="text/javascript" src="./hamer_files/offline.js"></script>
<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">
</head>
<body class="s-bg-ddd pc no-3d perspective yes-3d" style="-webkit-user-select: none;">
<section class="u-alert">
<img style="display:none;" src="./hamer_files/loading_large.gif">
<div class="alert-loading z-move">
<div class="cycleWrap"> <span class="cycle cycle-1"></span>
<span class="cycle cycle-2"></span><span class="cycle cycle-3"></span><span class="cycle cycle-4"></span>
</div>
<div class="lineWrap"> <span class="line line-1"></span><span class="line line-2"></span><span class="line line-3"></span>
</div>
</div>
</section>
<section class="u-arrow">
<p class="css_sprite01"></p>
</section>
<section class="p-ct transformNode-2d transformNode-3d" style="height: 918px;">
<div class="translate-back" style="height: 918px;">
<div class="m-page m-fengye" data-page-type="info_pic3" data-statics="info_pic3" style="height: 918px;">
<div class="page-con lazy-finish" data-position="50% 50%" data-size="cover" style="height: 920px; background-image: url(hamer_files/1.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/2.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/3.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/4.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/5.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/6.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/7.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
<div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;">
<div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/8.jpg); background-size: cover; background-position: 50% 50%;"></div>
</div>
</div>
</section>
<section class="u-pageLoading">
<img src="./hamer_files/load.gif" alt="loading">
</section>
<script src="./hamer_files/init.mix.js" type="text/javascript" charset="utf-8"></script>
<script src="./hamer_files/coffee.js" type="text/javascript" charset="utf-8"></script>
<script src="./hamer_files/99_main.js" type="text/javascript" charset="utf-8"></script>
</body></html>
2、css代码:
@charset "utf-8";
.ad_foot li { margin:0 auto 1em; font-size:1.8em; padding:15px; background:#FFF;}
.ad_foot li a {display:block;}
.ad_foot li .l {width:75px; height:75px; float:left; overflow:hidden;}
.ad_foot li .l img {width:75px; width:75px;}
.ad_foot li .r {width:78%; float:left; margin-left:30px; color:#666; overflow:hidden;}
.ad_foot li .r p {color:#999; font-size:1.2em; }
.ad_foot li .r span {font-size:0.8em;}
.ad_foot li .r i {font-style:normal;}
.lazy-img, .lazy-finish{background-color:#f0eded;}
.page-list{font-size:20px;font-family: "Microsoft yahei";padding-left:17px;padding-top:30px;height:35px;border-bottom:1px solid #b5b5b5;display:none;}
.ad_foot{padding:15px 15px 0 15px;}
/*声音播放按钮*/
#song_img {width:293px; height:41px; display:block; position:absolute; right:4.1em; top:1.6em; font-size:1.7em; text-align:center; line-height:41px; color:#FFF; background:url(../img/music_c3.png) no-repeat 0 0;}
/*底部推荐*/
.ad_list{margin-top:2em;}.ad_list li {width:46%; background:none; padding:0; float:left;margin-bottom: 1em;}
.ad_list li.r {float:right;}.ad_list li a img {width:100%; height:auto;}
.ad_foot h3 {width:100%; height:48px; line-height:48px; background:#F9F5EC;}
.ad_foot h3 a {display:inline-block; color:#444; width:50%; text-align:center; font-size:1.5em; height:48px; border-bottom:2px solid #FF9240;}
.ad_foot h3 a.active {color:#FFF; background:#FF9240;}
.magazine_1 li {
width:100%;
margin-bottom: 1em;
font-size: 1.8em;
padding: 15px;
background: #FFF;}
.magazine_1 li a {display:block;}
.magazine_1 li .l {width: 75px;
height: 75px;
float: left;
overflow: hidden;}
.magazine_1 li .l img {width:75px; height:75px;}
.magazine_1 li .r {width: 78%;
float: left;
margin-left: 30px;
color: #666;
overflow: hidden;}
.magazine_1 li .r p {
color: #999;
font-size: 1.2em;
.magazine_1 li .r span {font-size:0.8em;}
.ad_foot li .r i {font-style:normal;}
3、运行效果如下: