V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cc7756789
V2EX  ›  问与答

css 利用 border 制作三角形,需要三条边的颜色不遮住其他区域怎么办?

  •  
  •   cc7756789 · Sep 16, 2015 · 2387 views
    This topic created in 3879 days ago, the information mentioned may be changed or developed.

    picture

    border-width: 10px;
    border-color: #00A2CA #ffffff #ffffff #ffffff;
    border-style:solid;
    

    好像没有透明度,那么怎么设置另外三条边不遮住其他区域呢?

    4 replies    2015-09-16 09:15:34 +08:00
    ljbha007
        1
    ljbha007  
       Sep 16, 2015
    你设置成下面的底色就行了 不然就用 png 图片吧
    pseudo
        2
    pseudo  
       Sep 16, 2015
    #fff 改成 transparent 试试
    gongpeione
        3
    gongpeione  
       Sep 16, 2015
    transparent √
    emric
        4
    emric  
       Sep 16, 2015
    border: 10px solid;
    border-color: #00A2CA transparent transparent;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3298 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 10:29 · PVG 18:29 · LAX 03:29 · JFK 06:29
    ♥ Do have faith in what you're doing.