<script>
var getPercent = function () {
var percent = '25%';
if (window.innerWidth < 1280) {
percent = '24.9%';
} else if (window.innerWidth <= 1440) {
percent = '19.9%';
} else if (window.innerWidth <= 1600) {
percent = '16.6%';
} else {
percent = '14%';
}
return percent;
}
window.onresize = function () {
$('.ratio-patient-1').css("width", getPercent());
}//监听窗口变化
document.write('<style>.ratio-patient-1{width:' + getPercent() + ' ;}</style>');//自适应宽度
document.write('<style>.tag-1{background:' + BingZhongColor + ' ;}</style>');//病重颜色
</script>
document 屏幕自适应设置
推荐阅读
- anyproxy-rule模块实现接口mock功能
- 谈谈对维护测试的认识
- Python 爬虫 知识架构图
- 【转】【Axure学习】之短信动态验证码+图片动态验证码
- 【PyCharm编辑器】之无法导入引用手动新建的包或类,报:This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases.
- 【Mac + ATX基于uiautomator2】使用weditor时,报错:requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
- Linux学习
- 【Mac + Appium + Python3.6学习(三)】之IOS自动化测试环境配置
- python 学习教程
- Ubuntu 安装Appium