Html实用代码集合

 ======================================
让网页背景不滚动(IE适用)
======================================


<Body Background="图片文件" bgproperties="fixed">


======================================
自动换行html代码
======================================


<html>
<head>
<title></title>
<meta content='text/html; charset=gb2312' http-equiv='Content-Type'>
</head>
<body bgcolor=#f5f5ff>
<pre>
<font size=2 face=宋体>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all">
<tr>
<td style="WORD-BREAK: break-all; WORD-WRAP: break-word">
文本正文
</td>
</tr>
</table>
</pre>
</FONT>
</body>
</html>


======================================
细线分隔线
======================================


<hr noshade size=0 color=#C0C0C0>


======================================
自动跳转页面代码
======================================


<meta http-equiv="refresh" content="5;url="> content="5"中的5代表5秒后转到指定的url

======================================
iframe(嵌入式帧)自适应高度
======================================


填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。
*对跨域引用有权限问题,请查阅其他资料。
<iframe name="iframe名称" src="要嵌入的地址" scrolling=no width="100%" height="100%" frameborder=no οnlοad="document.all['guestbook'].style.height=iframe名称.document.body.scrollHeight"></iframe>

======================================
select挡住div的解决方法
======================================


在div里加入下面的代码,根据需要调整就可以了 
<iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;">
</iframe>

======================================
IE地址栏前换成自己的图标
======================================


<link rel="Shortcut Icon" href="你的图表名称.ico">
<link rel="Bookmark" href="你的图表名称.ico">


======================================
让IFRAME内的文档背景透明
======================================
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>

======================================
左右阴影背景的CSS定义方法
======================================

body {
text-align:center;
background-repeat: repeat-y;
background-position: center;
background-image: url(../images/bg.jpg);
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值