几个div+css图片滚动显示的代码
由下往上的:
<div id="demo" onmouseover="ij=1" style="border:1px solid gray; overflow: hidden; height: 119px; width:211px " onmouseout="ij=0">
<div id="demo1">1<br />2br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>
可以是任何的HTML内容<br>
<font color="red">HTML</font><br>
</div>
<div id="demo2"></div>
</div>
<script type="text/javascript">
var ij=0;t=demo.scrollTop
demo2.innerHTML=demo1.innerHTML
function qswhMarquee2(){
if (ij==1)return
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else
demo.scrollTop++
}
setInterval(qswhMarquee2,50)
</script>
由右往左的:
<!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/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<style>
.scroll_div {width:600px; height:62px;margin:0 auto; overflow: hidden; white-space: nowrap; background:#ffffff;}
.scroll_div img {width:120px;height:60px;border: 0;margin: auto 8px; border:1px #efefef solid;}
#scroll_begin, #scroll_end, #scroll_begin ul, #scroll_end ul, #scroll_begin ul li, #scroll_end ul li{display:inline;}
</style>
<script language="javascript">
function ScrollImgLeft(){
var speed=20
var scroll_begin = document.getElementById("scroll_begin");
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else
scroll_div.scrollLeft++
}
var MyMar=
相关文档:
<!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/html; charset=utf-8" />
<title>www.zishu.cn< ......
输入框只有底框:
.box
{
border-style:none none solid none;
border-bottom-width:1px;
border-bottom-color:#999999;
}
表格
<table>
<tbody>
<tr><td></td></tr>
</tbody>
</table> ......
1 页面布局与规划
2 写入整体层结构与CSS
3 页面顶部制作之一
4 页面顶部制作之二
5 页面制作-用好border和clear
在网页制作中,有许多的术语,例如:CSS、HTML、DHTML、XHTML等等。在下面的文章中我们将会用到一些有关于HTML的基本知识,而在你学习这篇入门教程之前,请确定你已经具有 ......
在当今web2.0时代,在设计网页的时候大家都会使用div+css进行布局,有点就不用多说了,自然有很多好处了,至少会比用table布局少些代码,而用div布局也有他们的不方便之处,就是比较复杂,尤其是多个div在一行显示,多个浏览器兼容等等,所以初学者还是尽量用table布局,待熟练了在用div.
现在说的是DIV+CSS中clear:both的作用,先看 ......
通过使页面动态加载不同CSS实现多界面
方法一:
<%@page language="C#"%>
<%@import namespace="System.Data"%>
<script language="c#" runat="server">
public void page_load(Object obj,EventArgs e)
{
//创建服务器端控件.
//指定的标记"LINK"初始化此类的新实例.
HtmlGeneric ......