How to make a transparent border using CSS?

前端 未结 4 507
攒了一身酷
攒了一身酷 2020-12-04 12:11

I\'m trying to do something like this for a client who has a blog.

\"http://i.stack.imgur.com/4h31s.png\"

4条回答
  •  悲哀的现实
    2020-12-04 12:52

    use rgba (rgb with alpha transparency):

    border: 10px solid rgba(0,0,0,0.5); // 0.5 means 50% of opacity
    

    The alpha transparency variate between 0 (0% opacity = 100% transparent) and 1 (100 opacity = 0% transparent)

提交回复
热议问题