Negative Border Radius in CSS?

前端 未结 3 1668

I\'m trying to do CSS to make a div that looks like this:

I\'m pretty much started with this:

.player {
    width: 480px;
    height: 80px;
    bord         


        
3条回答
  •  不思量自难忘°
    2020-12-09 13:42

    Here's yet another way of doing it, this time using a radial background image. This lets it be transparent and works in both Firefox and Chrome.

    .player {
      width: 480px;
      height: 80px;
      border-radius: 40px;
      background-image: radial-gradient(circle at 38px 40px, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 40px, blue 40px);
      color: #FFF;
    }

提交回复
热议问题