Removing black borders on a vimeo iframe embed using CSS?

前端 未结 8 2038
佛祖请我去吃肉
佛祖请我去吃肉 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 <p> tags, the <p> 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 <p> tags from my embedded videos:

    $('.embed-container iframe').unwrap();
    
    0 讨论(0)
  • 2021-01-12 12:28

    Simply put frameborder="0" as one of your attributes.

    0 讨论(0)
提交回复
热议问题