当前位置:网站首页>Get the width and height of the screen in real time (adaptive)
Get the width and height of the screen in real time (adaptive)
2022-07-02 08:00:00 【Rivers smile】
The code is almost like this , You can monitor the height and width of the screen at this time , If it changes, then Modify the length and width of the target box
export default {
name: 'page-index',
data(){
return{
windowWidth: document.documentElement.clientWidth, // Real time screen width
windowHeight: document.documentElement.clientHeight, // Real time screen height
}
},
methods: {
},
// <!-- stay watch Medium monitor real-time width and height -->
watch: {
windowHeight (val) {
let that = this;
console.log(" Real time screen height :",val, that.windowHeight );
},
windowWidth (val) {
let that = this;
console.log(" Real time screen width :",val, that.windowHeight );
}
},
mounted() {
var that = this;
// <!-- hold window.onresize The event hangs to mounted On the function -->
window.onresize = () => {
return (() => {
window.fullHeight = document.documentElement.clientHeight;
window.fullWidth = document.documentElement.clientWidth;
that.windowHeight = window.fullHeight; // high
that.windowWidth = window.fullWidth; // wide
})()
};
},
}边栏推荐
- 浅谈深度学习模型中的后门
- Latex formula normal and italic
- Solve the problem of latex picture floating
- 浅谈深度学习中的对抗样本及其生成方法
- C # connect to MySQL database
- Sequence problem for tqdm and print
- 【Paper Reading】
- 【Cascade FPD】《Deep Convolutional Network Cascade for Facial Point Detection》
- 【TCDCN】《Facial landmark detection by deep multi-task learning》
- Specification for package drawing
猜你喜欢

MySQL优化
![[mixup] mixup: Beyond Imperial Risk Minimization](/img/14/8d6a76b79a2317fa619e6b7bf87f88.png)
[mixup] mixup: Beyond Imperial Risk Minimization

【Wing Loss】《Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks》

【Hide-and-Seek】《Hide-and-Seek: A Data Augmentation Technique for Weakly-Supervised Localization xxx》

【AutoAugment】《AutoAugment:Learning Augmentation Policies from Data》

The internal network of the server can be accessed, but the external network cannot be accessed
![[learning notes] matlab self compiled Gaussian smoother +sobel operator derivation](/img/f1/4afde3a4bf01254b3e3ff8bc659f9c.png)
[learning notes] matlab self compiled Gaussian smoother +sobel operator derivation

【Batch】learning notes

CVPR19-Deep Stacked Hierarchical Multi-patch Network for Image Deblurring论文复现

Jetson nano installation tensorflow stepping pit record (scipy1.4.1)
随机推荐
Organigramme des activités
[mixup] mixup: Beyond Imperial Risk Minimization
Dynamic extensible representation for category incremental learning -- der
Brief introduction of prompt paradigm
Income in the first month of naked resignation
Timeout docking video generation
【BiSeNet】《BiSeNet:Bilateral Segmentation Network for Real-time Semantic Segmentation》
The internal network of the server can be accessed, but the external network cannot be accessed
Graph Pooling 简析
w10升级至W11系统,黑屏但鼠标与桌面快捷方式能用,如何解决
用MLP代替掉Self-Attention
【Mixup】《Mixup:Beyond Empirical Risk Minimization》
open3d学习笔记四【表面重建】
Mmdetection model fine tuning
【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
【Mixed Pooling】《Mixed Pooling for Convolutional Neural Networks》
【Batch】learning notes
【TCDCN】《Facial landmark detection by deep multi-task learning》
SQL server如何卸载干净
常量指针和指针常量