Sinhvienngoaithuong
.videoyt {
aspect-ratio: 16 / 9;
width: 100%;
}
.videoyt {
border-radius: 30px;
}
@media screen and (max-width: 850px){
.videoyt {
height: 289px;
}
}
<iframe class="videoyt" src="https://www.youtube.com/embed/msizPweg3kE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;" allowfullscreen></iframe>
cách 2:
/*youtubecss*/
.video-containervn {
position: relative;
padding-bottom: 56.25%;
margin-bottom: 12px;
}
.video-containervn iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 20px;
}
@media screen and (max-width: 850px) {
.video-containervn iframe {
height: 150%!important;
}
.video-containervn {
margin-bottom: 122px!important;
}
}
<div class="video-containervn">
<iframe
src="https://www.youtube.com/embed/msizPweg3kE"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope;"
allowfullscreen></iframe>
</div>
Nếu Flatsome
[ux_video url="https://www.youtube.com/watch?v=GZaFvRkQHM0"]
không phải thì thêm Css
.video-container {
position: relative;
padding-bottom: 56.25%;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
trong bài viết thì chèn
<div class="video-container">
<iframe
src="https://www.youtube.com/embed/msizPweg3kE"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope;"
allowfullscreen></iframe>
</div>
Cách khác thêm css
.video {
aspect-ratio: 16 / 9;
width: 100%;
}
<iframe class="video" src="https://www.youtube.com/embed/msizPweg3kE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;" allowfullscreen></iframe>
nguồn: https://dev.to/deammer/embed-responsive-youtube-videos-in-2021-5dkh
Responsive iFrame chỉ sử dụng CSS (viblo.asia)
xuat nhap khau tong quan [ux_video url="https://www.youtube.com/watch?v=zPuLsucD_xY"] nhan su tong quan [ux_video url="https://www.youtube.com/watch?v=MAfmNRczvE4"] tố chất nhân sự [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"] [ux_video url="https://www.youtube.com/watch?v=V1eAPra2hPk&t"]
xuat nhap khau
<div class="video-container">
<iframe
src="https://www.youtube.com/embed/zPuLsucD_xY"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope;"
allowfullscreen></iframe>
</div>
nhan su
<div class="video-container">
<iframe
src="https://www.youtube.com/embed/MAfmNRczvE4"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope;"
allowfullscreen></iframe>
</div>
- https://vinatrain.edu.vn/viec-lam-nganh-xuat-nhap-khau/
- https://vinatrain.edu.vn/mat-trai-nganh-xuat-nhap-khau/
- https://vinatrain.edu.vn/nhu-cau-tuyen-dung-nganh-xuat-nhap-khau/
- https://vinatrain.edu.vn/kien-thuc-can-co-cua-nhan-vien-xuat-nhap-khau/
- https://vinatrain.edu.vn/xuat-nhap-khau-la-gi/
- https://vinatrain.edu.vn/co-nen-hoc-xuat-nhap-khau-khong/
- https://vinatrain.edu.vn/khoa-hoc-xuat-nhap-khau-het-bao-nhieu-tien/
- https://vinatrain.edu.vn/co-nen-hoc-xuat-nhap-khau-online-khong/
- https://vinatrain.edu.vn/hoc-xuat-nhap-khau-o-dau-tot/
- https://vinatrain.edu.vn/tai-lieu-xuat-nhap-khau/
- https://vinatrain.edu.vn/tu-hoc-xuat-nhap-khau/
- https://vinatrain.edu.vn/hoc-xuat-nhap-khau-co-de-xin-viec-khong/
- https://vinatrain.edu.vn/nganh-xuat-nhap-khau-thi-khoi-gi-vao-truong-nao/
- https://vinatrain.edu.vn/lo-trinh-hoc-xuat-nhap-khau/
- https://vinatrain.edu.vn/lam-nhan-vien-xuat-nhap-khau-co-kho-khong/
- https://vinatrain.edu.vn/lam-xuat-nhap-khau-can-hoc-nhung-gi/
- https://vinatrain.edu.vn/phuong-phap-hoc-xuat-nhap-khau/
- https://vinatrain.edu.vn/con-gai-co-nen-lam-xuat-nhap-khau/
- https://vinatrain.edu.vn/kinh-nghiem-phong-van-xuat-nhap-khau/
/*youtubecss*/
.video-container {
position: relative;
padding-bottom: 56.25%;
margin-bottom: 12px;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 20px;
}
@media screen and (max-width: 850px) {
.video-container iframe {
height: 150%!important;
}
.video-container {
margin-bottom: 122px!important;
}
}
Tags: code