Html&CSS
iteye_1736
这个作者很懒,什么都没留下…
展开
-
div自动居中
让div自动居中://定义宽度,不定义宽度无效[code="c#"]witdh:200px;[/code]//关键[code="c#"]margin:0 auto;[/code]2014-07-01 11:07:28 · 142 阅读 · 0 评论 -
js延迟广告加载
1、在你要放置广告的div设定ID,内容可自定义[code="html"]读取中……[/code]2、在前面加入以下代码[code="html"] [/code] 3、到页面最下面之后加入以下代码[code=" html"] var target=document.getElementById("banner")...原创 2014-07-09 14:51:57 · 167 阅读 · 0 评论 -
IE document.getElementsByName获取失败的解决方案
//非IE浏览器正常显示数目,IE显示数目为0[code="js"] var LoadImg = document.getElementsByName("ImgDiv"); alert(LoadImg.length);[/code]完善修改后:[code="js"]if (!+[1, ]) //IE{ var LoadImg = document....原创 2014-07-09 17:25:04 · 243 阅读 · 0 评论 -
CSS 背景图随div大小缩放 兼容IE
让背景图片的大小自动适应DIV大小,兼容主流浏览器,包括Firefox、Chrome以及 IE 等:[code="css"].imgDiv{ width:500px; height:500px; background-image:url('../images/index.jpg'); -moz-background-size: 100% 100%; ...原创 2014-07-16 15:04:16 · 452 阅读 · 0 评论 -
CSS 判断IE并执行样式
各种浏览器对于不同元素常常有不同的表现,为了让各浏览器表现一致,需要判断是否为IE,如果为IE则执行特定的样式设置,例:[code="CSS"].linkInput{ width: 259px; height: 22px; width: 255px \9; //后加 "\9"则兼容所有IE版本,IE下执行的样式,其他浏览器忽略 height: ...原创 2014-07-16 15:58:23 · 994 阅读 · 0 评论 -
点击按钮跳转页面
点击按钮跳转到某个页面:[code="html"][/code]原创 2014-07-22 15:12:51 · 1928 阅读 · 0 评论 -
input标签,输入内容后默认值消失实现方法
[code="html"][/code]原创 2014-09-23 12:59:45 · 1494 阅读 · 0 评论