When you 在 WordPress 中嵌入视频, by default these videos are not responsive. With the rise of 响应式 WordPress 主题, users visiting your site on smaller screens will see video containers that are stretched and disproportionate. In this article, we will show you how to make your videos responsive in WordPress with FitVids.
FitVids is a jQuery plugin which allows you to make your video embeds responsive. If you want to use it on your WordPress site, then all you need to do is install and activate 适用于 WordPress 的 FitVids plugin. After activation, you need to go to 外观 » FitVids and enter a CSS selector class. WordPress automatically adds .post class to the articles, so you can just use that.
手动添加FitVids以使您的视频在WordPress中具有响应性 （Manually Add FitVids to Make Your Videos Responsive in WordPress）
If you don’t want to install the FitVids for WordPress plugin, then you can add FitVids jQuery plugin manually. First thing you need to do is download and extract FitVids jQuery 插件 to your computer. Now you need to upload the extracted FitVids.js-master folder to your theme’s js directory.
You need to connect to your website 使用 FTP 客户端 like Filezilla and open your theme directory. It is possible that your WordPress theme may not have a js folder. If it is not there, then you need to create one and then upload FitVids.js-master folder from your computer.