Preventing “double” borders in CSS

后端 未结 17 1522
梦毁少年i
梦毁少年i 2020-12-02 11:49

Say I have two divs next to each other (take https://chrome.google.com/webstore/category/home as reference) with a border.

Is there a way (preferably a CSS trick) to

17条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 12:34

      

    CSS:

      .one{
        width:100px;
        height:100px;
        border:thin red solid;
        float:left;
      }
    .two{
        width:100px;
        height:100px;
        border-style: solid solid solid none;
    
        border-color:red;
        border-width:1px;
        float:left;
    }
    

    jsFiddle ​

提交回复
热议问题