当前位置:网站首页>Multimedia query
Multimedia query
2022-07-05 03:28:00 【Lao Zhang typed the code online】
min-device-width Follow min-width The difference between
@media screen and (min-device-width:375px) and (max-device-width:540px){
#div0{
background: red;
}
}
@media screen and (min-width:541px) and (max-width:800px){
#div0{
background: blue;
}
}
min-device-width Is the width of the entire display area of the device , for example , Real device screen width .
min-width Is the width of the target display area , for example , Browser width .
Example :
If you use min-device-width, So in PC When browsing a web page on a browser , When the browser percentage is reduced or enlarged, it is not executed CSS Of ,PC The equipment will not change .
But if max-width, When zooming out or zooming in on the browser, you execute CSS Of , Because browsers ( Display area ) The size has changed .
If you use max-device-width, When the mobile phone changes from vertical to horizontal ,CSS It's not enforced , Because the width of the mobile phone has not changed .
If you use max-width, So when the mobile phone changes from vertical to horizontal ,CSS It's Executive , Because the display area has changed .
In actual development, we can flexibly use these two respective characteristics to achieve responsive development
Multimedia query is often introduced
1. Internal style
Inside the current component style Directly in the label @media Compiling
2. External style
Use in components link Introduce externally created css Style sheets
3. Inside style Label style
utilize style On the label media attribute , Create multiple... According to different sizes of equipment style label (link It's also on the label media attribute , therefore link You can also import more )
边栏推荐
- 001 chip test
- The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
- SPI and IIC communication protocol
- Design and implementation of high availability website architecture
- FBO and RBO disappeared in webgpu
- SQL performance optimization skills
- Accuracy problem and solution of BigDecimal
- Utilisation simple de devtools
- MySQL winter vacation self-study 2022 11 (10)
- Learning notes of raspberry pie 4B - IO communication (I2C)
猜你喜欢
2.常见的请求方法
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
SQL injection exercise -- sqli Labs
端口,域名,协议。
Master Fur
Design and practice of kubernetes cluster and application monitoring scheme
VM in-depth learning (XXV) -class file overview
Tencent cloud, realize image upload
Design and implementation of campus epidemic prevention and control system based on SSM
IPv6 experiment
随机推荐
Design and implementation of high availability website architecture
SQL performance optimization skills
What is the most effective way to convert int to string- What is the most efficient way to convert an int to a String?
Voice chip wt2003h4 B008 single chip to realize the quick design of intelligent doorbell scheme
[groovy] string (string type variable definition | character type variable definition)
問下,這個ADB mysql支持sqlserver嗎?
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Basic knowledge of tuples
Comparison of advantages and disadvantages between platform entry and independent deployment
51 independent key basic experiment
Zero foundation uses paddlepaddle to build lenet-5 network
Sqoop安装
Machine learning experiment report 1 - linear model, decision tree, neural network part
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
ICSI213/IECE213 Data Structures
Cette ADB MySQL prend - elle en charge SQL Server?
Port, domain name, protocol.
Leetcode92. reverse linked list II
This + closure + scope interview question