一段巧妙的css debug代碼_CSS/HTML

來源:互聯網
上載者:User
想法很簡單,代碼很簡潔,效果也不錯,蠻有用(這種進階東東 IE 自然又是不認識的)。

複製代碼 代碼如下:
* { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue }


很容易理解,用不同顏色不同線型的 outline 來標註層級關係。
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.