Home > Web Front-end > HTML Tutorial > When using ul to create a table, the top line and the left line cannot be displayed_html/css_WEB-ITnose

When using ul to create a table, the top line and the left line cannot be displayed_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:41
Original
1329 people have browsed it

这是代码




ul{width:160px;margin:0px;padding:0px;}
li{float:left;width:50px;list-style-type:none;border-bottom:#000 solid 1px;border-right:#000 solid 1px;}
.border-t:{border-top:#888 solid 2px;}
.border-b:{border-top:#000 solid 1px;border-left:#000 solid 1px;}
.border-l:{border-left:#000 solid 2px;}




    f
    fsdg
    nsbp


    nsbp
  • f

  • fsdg



    nsbp
  • f

  • fsdg



    nsbp
  • f

  • fsdg





显示结果后表格最左边的和最上边没有边框


回复讨论(解决方案)

大哥。。。样式.border-t:{border-top:#888 solid 2px;}不能加‘:’。。。。然后你的有的是#888.。。。有的是#000 .。。。有的2像素。。。有的1像素。。。不懂了。。。我改了下。。。你看下是不是你想要的





ul{width:160px;margin:0px;padding:0px;}
li{float:left;width:50px;list-style-type:none;border-bottom:#000 solid 1px;border-right:#000 solid 1px;}
.border-t{border-top:#000 solid 1px;}
.border-b{border-top:#000 solid 1px;border-left:#000 solid 1px;}
.border-l{border-left:#000 solid 1px;}
 



    f
    fsdg
    nsbp


    nsbp
  • f

  • fsdg



    nsbp
  • f

  • fsdg



    nsbp
  • f

  • fsdg



太感谢了,就是那个问题,忽略掉了。

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template