Removing black borders on a vimeo iframe embed using CSS?

前端 未结 8 2048
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-12 11:29

I am trying to find a way to hide the black strips across the top and bottom of a vimeo video. I thought there might be a way to cover them up with CSS.

I basically

8条回答
  •  余生分开走
    2021-01-12 12:26

    I had this same issue and the problem was simple to solve. My videos were embedded in Wordpress pages and posts using oEmbed. Wordpress was wrapping my embedded videos in

    tags, the

    tags had some margin which was causing black borders on the top and bottom of my videos. I used the following bit of jQuery to remove the

    tags from my embedded videos:

    $('.embed-container iframe').unwrap();
    

提交回复
热议问题