<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{' + getPercent() + ' ;}</style>');//自适应宽度
document.write('<style>.tag-1{background:' + BingZhongColor + ' ;}</style>');//病重颜色
</script>