Home >Web Front-end >HTML Tutorial >CSS相关知识和经验的碎片化记录 - yuzhihui

CSS相关知识和经验的碎片化记录 - yuzhihui

WBOY
WBOYOriginal
2016-05-21 08:42:101249browse

1、子DIV块中设置margin-top时影响父DIV块位置的问题

  解决办法1:若子DIV块中使用margin-top,则在父DIV块中添加:overflow:hidden;
  解决办法2:在子DIV块中用padding-top代替margin-top。

2、在IE浏览器上div元素块不能对ActiveX控件界面进行遮挡的问题

  解决办法:在div元素块中添加子元素iframe,并设置其相应的样式和属性,如:

<span style="color: #0000ff;"><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="preLoadMask"</span><span style="color: #ff0000;"> class</span><span style="color: #0000ff;">="ui_preLoadMask"</span><span style="color: #0000ff;">></span>
  <span style="color: #0000ff;"><span style="color: #800000;">iframe </span><span style="color: #ff0000;">style</span><span style="color: #0000ff;">="position:absolute;z-index:-1;width:100%;height:100%;top:0;left:0;scrolling:no;filter:alpha(opacity=0);opacity:0.5;"</span><span style="color: #ff0000;"> frameborder</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">></span><span style="color: #800000;">iframe</span><span style="color: #0000ff;">></span><br><span style="color: #0000ff;"></span><span style="color: #800000;">div</span><span style="color: #0000ff;">></span></span></span>

......

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn