Archives

Archive for 2006-12

Clear:both 与margin-top混合使用

(本文翻译自ADOBE)
Clear:both 与margin-top混合使用时在不同浏览器中显示是不一样的,所以尽量避免这两个属性在同一元素上同时使用。
下面是不同浏览器中的显示情况:

.floats {

        width: 25px;

        height: 25px;

        background-color: #CCCCCC;

        border: 1px solid black;

        float: left;

}

 

 

.clear1, .clear2, .clear3, .clear4

{

        clear: both;

        margin-bottom: 20px;

}

               

.clear1 {

      […]

为你的链接添加站点缩略图

snap.com 提供了一项服务,通过增加一段代码实现在你的站点链接上弹出所链接地址的网页缩略图,如:http://www.snap.com/。
具体步骤:
一、进入注册页面
在左侧的注册框中有两个文本输入框:
Site URL:填入你要放置站点缩略功能的网站域名,比如 http://www.fscommand.com.cn/
Email:你的联系email
点击绿色“Go to step 2”按钮。
二、输入验证码获取代码
在Enter Security Token: 中输入下面的验证码
选中“ I agree to the Terms & Conditions below.”复选框
点击“Get Code”按钮
在右侧Step 3: Copy Your Code文本框中出现你站点专用的代码。将这段代码拷贝到你站点的页面的标签中。

IE6中LIST元素背景消失BUG

(本文翻译自ADOBE)
在IE6中如果list元素在一个浮动的容器中,并且此容器的position属性为relative的时候,li 或dt等列表元素的背景可能会消失不见。这是一个IE6的BUG。解决方法就是将列表项目的position属性也设置为relative。例如:

/*CSS*/

div#wrapper {

    position: relative;  /* 导致 bug */

    float: left;

    width: 250px; 

}   

div#wrapper dt {

    background:#CCCCEE; ;  /* 导致 bug */

}

 

 

 

 

/*HTML*/

<div id=“wrapper”>

<dl>

<dt>List One</dt>  <!– this background won’t render –>

    <dd>Subitem 1 </dd>

    <dd>Subitem 2 </dd>

    <dd>Subitem 3 </dd>

    <dd>Subitem 4 </dd>

    <dd>Subitem […]