4 years ago (2015-10-14)  Front end and interface |   First to comment  10 
post score 0 times, average 0.0

I haven't written a technical post for a long time. This time, I have made a video of personal production in the blog for the time being. I use the code provided by Youku: It's an embed video tag, but the video length and width provided by Youku is helpless. The appearance of 600*400 is OK on the computer. The width of the mobile phone is too large to directly detonate the mobile phone screen. The user experience is very bad. The following code is implemented in different devices to automatically adapt to the width.The implementation principle is very simple. It is to use js (jquery) to dynamically set the long width of the video. Add the following code to the theme's functions.php file, and replace all #main-wrap-left in the code with the class name or ID of the article's div. Let the blog insert the video width adaptive

 

  
 

This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!

Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/let-blog-into-adaptive-video-width-2.html

Post comment

Style

No Comment

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW