标签:技术 布局 car 显示与隐藏 dia 页面 isp nav strong
举例:
@media screen and (min-width: 769px) and (max-width: 979px) {
.w {
width: 750px;
}
.top_nav ul li:first-child {
display: none;
}
.nav ul li:last-child {
display: none;
}
.bottom_cards .cards .item {
width: 49%;
}
.bottom_cards .cards:after {
display: none;
}
}
/*
设计图宽度为640px,
计算font-size的方法为: 要适配的屏幕尺寸/设计图尺寸*默认下的文字大小
即: 320/640*32 = 16(px)
*/
@media only screen and (width: 320px) {
html {
font-size: 16px;
}
}
/* 即: 360/640*32 = 18(px) */
@media only screen and (width: 360px) {
html {
font-size: 18px;
}
}
/* 即: 375/640*32 = 18.75(px) */
@media only screen and (width: 375px) {
html {
font-size: 18.75px;
}
}
/* 即: 414/640*32 = 20.7(px) */
@media only screen and (width: 414px) {
html {
font-size: 20.7px;
}
}
标签:技术 布局 car 显示与隐藏 dia 页面 isp nav strong
原文地址:https://www.cnblogs.com/belongs-to-qinghua/p/11352688.html