zoukankan      html  css  js  c++  java
  • 使用before、after伪类制作三角形

    使用before、after伪类实现三角形的制作,不需要再为三角形增加不必要的DOM元素,影响阅读。

    <!DOCTYPE html>
    <html>
    <head>
        <style>
            div{
                100px;
                height: 100px;
                border: 1px solid #ccc;
            }
            div:before,
            div:after{
                content: "";
                position: absolute;
                top: 40px;
                left: 100px;
                0px;
                height: 0px;
                border: 10px solid transparent;
                border-left-color: rgb(255,255,255);

            }
            div:before{
                top: 39px;
                border: 11px solid transparent;
                border-left-color: #ccc;
            }
        </style>
        
    </head>
    <body>
        <div></div>
    </body>
    </html>

  • 相关阅读:
    文化因素对商标翻译的影响
    Building An Effective Marketing Plan
    HipHop PHP简介(转)
    关于comet
    TI BSL in python
    剖析 HTTP 协议
    NSIS 打包脚本基础
    图解使用VS的安装项目打包程序
    [Java IO]06_JSON操作
    [Java IO]04_系统标准IO
  • 原文地址:https://www.cnblogs.com/charling/p/3655683.html
Copyright © 2011-2022 走看看