重庆最火的网站,免费做网站方法,网站推广的基本方法为(),网站推广seo设置Media所有参数汇总 width:浏览器可视宽度。 height:浏览器可视高度。 device-width:设备屏幕的宽度。 device-height:设备屏幕的高度。 orientation:检测设备目前处于横向还是纵向状态。 aspect-ratio:检测浏览器可视宽度和高度的比例。(例如#xff1a;aspect-ratio:16/9) de…Media所有参数汇总 width:浏览器可视宽度。 height:浏览器可视高度。 device-width:设备屏幕的宽度。 device-height:设备屏幕的高度。 orientation:检测设备目前处于横向还是纵向状态。 aspect-ratio:检测浏览器可视宽度和高度的比例。(例如aspect-ratio:16/9) device-aspect-ratio:检测设备的宽度和高度的比例。 color:检测颜色的位数。例如min-color:32就会检测设备是否拥有32位颜色 color-index:检查设备颜色索引表中的颜色他的值不能是负数。 monochrome:检测单色楨缓冲区域中的每个像素的位数。这个太高级估计咱很少会用的到 resolution:检测屏幕或打印机的分辨率。(例如min-resolution:300dpi或min-resolution:118dpcm)。 grid:检测输出的设备是网格的还是位图设备。 以下代码适用于pc端可制作一个“自适应布局” 实现代码如下
media(min-width:100px) and (max-width:800px){
body{
height: 500px;
}
}media(min-width:801px) and (max-width:1024px){
body{
height: 600px;
}
}
media(min-width:1025px) and (max-width:1280px){
body{
height: 700px;
}
}
media(min-width:1281px) and (max-width:1400px){
body{
height: 800px;
}
}
media(min-width:1401px) and (max-width:1680px){
body{
height: 900px;
}
}
media(min-width:1681px) and (max-width:1920px){
body{
height: 1000px;
}
}
media(min-width:1921px){
body{
height: 1080px;
}
}