Is there a way to do that? I don't want the video showing up on tablets or phones.
Use CSS media queries like this:
@media screen and (max-width: 680px)
{
.video { display : none; }
}
This will hide the class .video for all screens up to 680px wide
Edit: You can of course also do this the other way around, and set .video
to display: none
by default, and then use min-width
inside a media query to actually show it from a certain width.
Yes, with media queries:
<div id="video">
//Video here
</div>
@media only screen and (max-width: 500px) {
#video {
visibility: hidden;
}
}
This will hide the div with the ID of "video" for screensizes smaller than 500px (or whatever pixel width you determine).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.