CSS adding border radius to an IFrame

前端 未结 11 852
南旧
南旧 2020-12-31 05:50

Adding a border to an IFrame is no biggie - you do it like this e.g.:

  border: 4px solid #000;
  -moz-border-radius: 15px;
  border-radius: 15px;
         


        
11条回答
  •  Happy的楠姐
    2020-12-31 06:28

    Put the iframe in a wrapper element and give the wrapping element this CSS property:

    transform: translateY(0px);

    .corner-wrapper {
      display: block;
      overflow: hidden;
      width: 300px;
      height: 150px;
      border-radius: 10px;
      transform: translateZ(0px);
      border: 3px solid #eee;
    }

提交回复
热议问题