迅雷考题-W3C网页设计师

题目:
类似这样一个列表
后面的数字始终要跟在标题后面,始终离10px
整个宽度是300px
标题长度超出了以后要自动隐藏
要兼容IE6 IE7 ff2.0

这题目是我3个月前面迅雷的时候的考题
现场没做出来,回去以后做好了发过去~

现在把完美的解决方案放出来,有兴趣的研究一下吧~

点击查看页面

(因为wordpress会自动格式化插入的html代码,另存了一个文件)

发布者

Knight

Cast a cold Eye On Life,on Death Knight,pass by!

《迅雷考题-W3C网页设计师》上有25条评论

  1. 很喜欢这个皮肤!站长可否给我发一个!谢了!
    QQ:393880282

  2. 完美的方法并不完美。
    第一,内容显示不全,文字自动隐藏需要有“…”
    第二,内容隐藏的话需要有title
    第三,如果内容固定的话后面跟的后坠就应该居右显示

  3. cancan[2008-09-03 10:40 AM |

    完美的方法并不完美。
    第一,内容显示不全,文字自动隐藏需要有“…”
    第二,内容隐藏的话需要有title
    第三,如果内容固定的话后面跟的后坠就应该居右显示

    这位兄台,看题目要认真
    第一:我们讨论的是用纯CSS来实现效果
    第二:title这个总所周知的东西就不具体讨论了
    第三:如果只要实现居右显示就行的话,这道题目还有什么存在的意义?

  4. cancan[2008-09-03 10:40 AM |
    这位同学
    如果跟后缀居右显示这道题毫无难度可言
    文字自动隐藏变为…FF需要用到很多的私有属性支持性很差
    看来你根本没有深层理解意义

  5. [quote=cancan]完美的方法并不完美。
    第一,内容显示不全,文字自动隐藏需要有“…”
    第二,内容隐藏的话需要有title
    第三,如果内容固定的话后面跟的后坠就应该居右显示[/quote]
    骑士是挺贱,但是你也不能跟着犯贱。这样很不好!!

  6. 被张样例图给误导了,图上遮挡的是蓝色的文字,还以为这样一点都不难。
    结果沟通后才知道,一行由2部分组成,后面部分间距10像素贴在前面部分后面;
    文字总长超过设定宽度隐藏前面的那段文字的超出部分,后面的文字不用遮挡。

  7. 先入为主了,认定要出现途上的效果,文字也是描述一下图上的效果,所以仔细看说明。

  8. 可以使用max-width属性,但是IE不支持,想看看你是怎么做的

  9. 查看代码吧,里面能看到,你的方法我试了,IE6都不行,我这个能过IE6。FF1.5,FF3.0,不能通过OPERA任何版本,IE7没装,估计IE,FF是没问题的了

  10. 其次你和我的方法都有一个致命问题,给后缀预留宽度,实际中这个宽度无法预测,就是说你们的办法都不能达到完美效果

  11. 找到完美解决方案了,支持IE7,FF1.5+,OPERA8.5+,SAFARI4.3。
    HTML代码没变,改变了CSS,CSS如下

    * {
    font-size: 12px;
    line-height: 20px;
    margin: 0px;
    padding: 0px;
    list-style-type: none;
    }
    ul {
    width: 300px;
    overflow: hidden;
    }
    li {
    height: 20px;
    overflow: hidden;
    clear: both;
    padding-right: 80px;
    }
    a {
    text-decoration: none;
    color: #626262;
    clear: none;
    height: 20px;
    overflow: hidden;
    float: left;
    }
    em {
    color: #1C91FF;
    font-style: normal;
    white-space: nowrap;
    padding-left: 10px;
    float: left;
    position: relative;
    margin-right: -90px;
    }

  12. @锐翔
    你好,之前因为wordpress会自动格式化html代码,显示不正确。今天我把文件上传到服务器了,你可以再看一下。

  13. Definitely returning here, that is decided, and a look at thriftsundae only made the case stronger, this is one of those rare websites that rewards regular visits rather than feeling stale after the first read which is something I cannot say about most of the places I bookmark today across all my topics.

  14. The conclusions felt earned rather than tacked on at the end like an afterthought, and a look at deoblob kept that careful structure going, you can tell when a writer has thought about the shape of their post versus just letting it ramble out and hoping for the best at the end which most do.

  15. Felt the writer respected the topic without being precious about it, and a look at daisycovevendorcorner continued that respectful but unfussy treatment, finding the right register for serious topics is hard and this site has clearly figured out how to take the topic seriously while still being readable for casual visitors regularly.

  16. Looking back on this reading session it stands as one of the better ones recently, and a look at digitalbuyarena extended that ranking, the informal ranking of reading sessions against each other is something I do mentally and this session ranks high largely because of this site and a couple of related pages here.

  17. Found something quietly useful here that I expect to return to, and a stop at trebleupper added more of the same, content with quiet utility ages well in a way that flashy hot takes do not and I have learned to weight quiet utility much higher when deciding what to bookmark for later use.

  18. Took my time with this rather than rushing because the writing rewards attention, and after flintcovecommerceatelier I had even more to absorb, the kind of content that pays back the patient reader rather than punishing them with empty filler is something I look for and rarely find in regular searches lately.

  19. Looking through the archives suggests this site has been doing this for a while at this level, and a look at igoblob confirmed the long term consistency, sites that have maintained quality across years rather than just a recent stretch are sites with serious editorial discipline and this one has clearly been at it for a while.

  20. A genuine compliment to the writer for keeping the post focused on what mattered, and a look at shopfieldmarket continued that disciplined focus, focus is a editorial choice that compounds across many small decisions and this site has clearly made those small decisions consistently across what I have read so far this week here.

  21. Picked up two new ideas that I expect will come up in conversations this week, and a look at crocusazalea added another, content that arms me with talking points rather than just filling time is the kind that provides ongoing value beyond the moment of reading and this site is generating that kind of ongoing value.

  22. Came away with a small but real shift in perspective on the topic, and a stop at carobhopper pushed that shift a bit further, the kind of subtle reframing that good writing does to a reader without making a big deal of it is something I always appreciate when it happens which is sadly not that often.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注