当前位置:网站首页>Media query usage
Media query usage
2022-07-02 08:00:00 【Rivers smile】
Media query : Change the screen size to font-size Set size => Set it up font-size( For example 50px, A size marker ) The size of the element
such as , Originally, it was 100px, Now it can be expressed as 2rem (2*50=100)
The original font size is 25, Now it can be expressed as 0.5rem (0.5*50=25) => Or we could just write it as .5
/* Order from small to large */
@media screen and (min-width:320px) {
html {
font-size: 50px;
}
}
@media screen and (min-width:720px) {
html {
font-size: 70px;
}
}
@media screen and (min-width: 920px) {
html {
font-size: 100px;
}
}
Here's how to use , If you take font-size=50px This .5rem Namely 25px
.top {
height: 1rem;
font-size: .5rem;
background-color: green;
color: #fff;
text-align: center;
line-height: 1rem;
}
Attach the attribute table that media query can listen to
| value | describe |
|---|---|
| aspect-ratio | Define the ratio between the width and height of the visible area of the page in the output device |
| color | Define the number of color elements in each group of output devices . If it's not a color device , Then the value is equal to 0 |
| color-index | Define the number of entries in the color query table of the output device . If you don't use a color lookup table , Then the value is equal to 0 |
| device-aspect-ratio | Define the ratio of the visible width of the screen to the height of the output device . |
| device-height | Define the screen visible height of the output device . |
| device-width | Define the screen visible width of the output device . |
| grid | Used to query whether the output device uses grid or lattice . |
| height | Define the height of the visible area of the page in the output device . |
| max-aspect-ratio | Define the maximum ratio of the screen visible width to the height of the output device . |
| max-color | Define the maximum number of color elements in each group of output devices . |
| max-color-index | Define the maximum number of entries in the color query table of the output device . |
| max-device-aspect-ratio | Define the maximum ratio of the screen visible width to the height of the output device . |
| max-device-height | Define the maximum visible height of the output device's screen . |
| max-device-width | Define the maximum screen visible width of the output device . |
| max-height | Define the maximum visible area height of the page in the output device . |
| max-monochrome | Defines the maximum number of monochrome elements per pixel in a monochrome frame buffer . |
| max-resolution | Define the maximum resolution of the device . |
| max-width | Define the maximum visible area width of the page in the output device . |
| min-aspect-ratio | Define the minimum ratio between the width and height of the visible area of the page in the output device . |
| min-color | Define the minimum number of color elements in each group of output devices . |
| min-color-index | Define the minimum number of entries in the color query table of the output device . |
| min-device-aspect-ratio | Define the minimum ratio of the screen visible width to the height of the output device . |
| min-device-width | Define the minimum screen visible width of the output device . |
| min-device-height | Define the minimum visible height of the output device's screen . |
| min-height | Define the minimum visible area height of the page in the output device . |
| min-monochrome | Defines the minimum number of monochrome elements per pixel in a monochrome frame buffer |
| min-resolution | Define the minimum resolution of the device . |
| min-width | Define the minimum visible area width of the page in the output device . |
| monochrome | Define the number of monochrome elements per pixel in a monochrome frame buffer . If it's not a monochrome device , Then the value is equal to 0 |
| orientation | Defines whether the height of the visible area of the page in the output device is greater than or equal to the width . |
| resolution | Define the resolution of the device . Such as :96dpi, 300dpi, 118dpcm |
| scan | Define the scanning process of TV equipment . |
| width | Define the width of the page visible area in the output device . |
边栏推荐
- It's great to save 10000 pictures of girls
- Vscode下中文乱码问题
- Execution of procedures
- Target detection for long tail distribution -- balanced group softmax
- Open3d learning note 3 [sampling and voxelization]
- 图像增强的几个方法以及Matlab代码
- 【FastDepth】《FastDepth:Fast Monocular Depth Estimation on Embedded Systems》
- 我的vim配置文件
- Data reverse attack under federated learning -- gradinversion
- 【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
猜你喜欢

【FastDepth】《FastDepth:Fast Monocular Depth Estimation on Embedded Systems》

【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》

【MobileNet V3】《Searching for MobileNetV3》

【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》

图像增强的几个方法以及Matlab代码

open3d学习笔记四【表面重建】

Income in the first month of naked resignation

用MLP代替掉Self-Attention

jetson nano安装tensorflow踩坑记录(scipy1.4.1)

【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
随机推荐
联邦学习下的数据逆向攻击 -- GradInversion
简易打包工具的安装与使用
[learning notes] numerical differentiation of back error propagation
CONDA common commands
CVPR19-Deep Stacked Hierarchical Multi-patch Network for Image Deblurring论文复现
【BiSeNet】《BiSeNet:Bilateral Segmentation Network for Real-time Semantic Segmentation》
Specification for package drawing
业务架构图
最长等比子序列
The internal network of the server can be accessed, but the external network cannot be accessed
Timeout docking video generation
Thesis writing tip2
Label propagation
【学习笔记】Matlab自编高斯平滑器+Sobel算子求导
Array and string processing, common status codes, differences between PHP and JS (JS)
【C#笔记】winform中保存DataGridView中的数据为Excel和CSV
Open3d learning note 3 [sampling and voxelization]
Daily practice (19): print binary tree from top to bottom
王-课外单词
AR系统总结收获