当前位置:网站首页>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 )
边栏推荐
- Basic knowledge of tuples
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- 看 TDengine 社区英雄线上发布会,听 TD Hero 聊开发者传奇故事
- [groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)
- 2021 Li Hongyi machine learning (1): basic concepts
- Logstash、Fluentd、Fluent Bit、Vector? How to choose the appropriate open source log collector
- LeetCode 234. Palindrome linked list
- IPv6 experiment
- 2.常见的请求方法
- Design of KTV intelligent dimming system based on MCU
猜你喜欢
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
Use of kubesphere configuration set (configmap)
Design and practice of kubernetes cluster and application monitoring scheme
Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
Anchor free series network yolox source code line by line explanation Part 2 (a total of 10, ensure to explain line by line, after reading, you can change the network at will, not just as a participan
Tencent cloud, realize image upload
El select, El option drop-down selection box
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
v-if VS v-show 2.0
Devtools的简单使用
随机推荐
SQL performance optimization skills
Azkaban实战
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Ubantu disk expansion (VMware)
Pat grade a 1119 pre- and post order traversals (30 points)
NPM introduction link symbolic link
Yyds dry goods inventory intelligent fan based on CC2530 design
How to make OS X read bash_ Profile instead of Profile file - how to make OS X to read bash_ profile not . profile file
Leetcode92. reverse linked list II
Talk about the SQL server version of DTM sub transaction barrier function
MySQL winter vacation self-study 2022 11 (9)
Leetcode42. connect rainwater
Idea inheritance relationship
Asp+access campus network goods trading platform
Sqoop installation
SQL injection exercise -- sqli Labs
Master Fur
[groovy] string (string injection function | asBoolean | execute | minus)
为什么腾讯阿里等互联网大厂诞生的好产品越来越少?
PHP cli getting input from user and then dumping into variable possible?