Html的部分常用技巧

解决下拉列表框显示在层上面的问题
在层里面加上一个iframe,优先级就比下拉列表框高了
<iframe style="position:absolute; visibility:inherit; top:0px; left:0px; width:640px; height:100%; z-index:-1;"></iframe>

颜色渐变
style="filter:progid XImageTransform.Microsoft.Gradient(startColorStr='#FFFFFF', endColorStr='#3F8CDA', gradientType='1')"

截断英文单词
style="word-wrap:break-word" style="word-break:break-all"

带阴影的文字
style="filter: DropShadow(Color=#dddddd, OffX=1, OffY=1);height:12px;font-family:Verdana;CURSOR: hand"

文字的白边
<P style="MARGIN-LEFT: 3px; MARGIN-TOP: 5px">

文字的间距
style="LETTER-SPACING:1px;line-height:150%"

表格不随内容撑大
style="table-layout:fixed;"

固定的一个地方显示较多数据
简单将你的控件放在一个DIV中将overflow属性设置成auto
<div style="height:400px;width:200px;overflow:auto">
<asp:datagrid id="MyGrid" runat="server"/>
</div>

用层遮盖其他东西(相对定位)
<center>
<div style="position:absolute;">
<div style="position:absolute;left:-50;top:-58"><table><tr><td width=100 height=16 bgcolor=ffff00></td></tr></table></div>
</div>
</center>

透明
style="FILTER: Alpha(Opacity=100, style=1)"

使用CSS替换图片
star:expression(
   onmouseover = function()
   {
       /*替换图片*/
       if(this.hover != null){
         this.name = this.src;
         this.src = this.src.replace('.jpg', '_over.jpg');
         this.HasChg = 1;
      }
  },
  onmouseout = function()
 {  
      /*还原本来的图片*/
    if(this.HasChg != null){
       this.src = this.name;
       this.HasChg = null;
   }
}
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值