当前位置:网站首页>Split screen bug notes
Split screen bug notes
2022-07-07 13:25:00 【Poplar siege lion】
After the split screen of the previous article , Find the bottom control div Affected by floating , Moved to the top , This is not reasonable , So clear float is set overflow: hidden attribute , But there are new problems , Click on 4 After split screen , Scroll bars appear on the page . It can be seen here that the set width and height are unreasonable , So we need to set it accurately .
First, we need to set the accommodation video Labeled div Size . After the page is loaded , Set by loading the completion event , Bold , Set to accommodate video Labeled div. The following code is the setup sheet video Width and height of label , Due to the margin:2px. So we need to subtract the width and height 4 Pixel .
mounted() {
this.$nextTick(() => {
// Set up
let player = document.getElementsByClassName('player');
console.log(player);
player[0].width = window.innerWidth - 400;
player[0].height = window.innerHeight - 80 - 60;
let vi = document.getElementById(1);
vi.width = window.innerWidth - 400 - 4;
vi.height = window.innerHeight - 80 - 60 - 4;
vi.margin = 0;
})
},
Moreover, setting video Just float the label , Here's one bug, At first, I set it to include video Labeled div float , There will be div And video There will be a gap between , So you can only set video Floating of labels
overflow: hidden;
background-color: aquamarine;
.video-content-1 {
//float: left; // Cannot set div Floating of , Will be in video There is a gap between
display:inline;
video {
float: left;
// width: 1520px - 4px;
// height: 849px - 60px;
margin: 2px;
padding: 0;
object-fit: fill;
border-width: 2px;
border-color: aqua;
box-sizing: border-box;
}
}
边栏推荐
猜你喜欢
“新红旗杯”桌面应用创意大赛2022
【Presto Profile系列】Timeline使用
JS缓动动画原理教学(超细节)
cmake 学习使用笔记(一)
centso7 openssl 报错Verify return code: 20 (unable to get local issuer certificate)
迅为iTOP-IMX6ULL开发板Pinctrl和GPIO子系统实验-修改设备树文件
LIS 最长上升子序列问题(动态规划、贪心+二分)
Cmake learning and use notes (1)
[Presto profile series] timeline use
ESP32 ① 编译环境
随机推荐
ESP32 ① 编译环境
MySQL master-slave replication
How to reset Google browser? Google Chrome restore default settings?
[untitled]
LIS 最长上升子序列问题(动态规划、贪心+二分)
[QNX Hypervisor 2.2用户手册]6.3.4 虚拟寄存器(guest_shm.h)
提升树莓派性能的方法
[untitled]
Esp32 ① compilation environment
Common text processing tools
RealBasicVSR测试图片、视频
学习突围2 - 关于高效学习的方法
php——laravel缓存cache
MongoDB的用户管理总结
信号强度(RSSI)知识整理
JS determines whether an object is empty
Realbasicvsr test pictures and videos
Pcap learning notes II: pcap4j source code Notes
记一次 .NET 某新能源系统 线程疯涨 分析
Users, groups, and permissions