当前位置:网站首页>Responsive layout a web page displays different effects on different devices) meta:vp
Responsive layout a web page displays different effects on different devices) meta:vp
2022-07-24 02:06:00 【(-^_^-)】
layout
Fixed width layout :width: 12px;height: 13px;--------- Not suitable for different devices
Fluid layout : Percentage setting width ---------------- Have elasticity , There will be dislocation
Responsive layout ------------ Information of detection equipment , The width of the equipment is different , The layout effect is better
A mixture of
Responsive layout
Media query ( Responsive layout is one of the ways )
media query------------ When setting the layout of a web page, first check the size and width of the display device
----------------------------- Different style settings are displayed according to different display devices
viewport viewport : Display the area of the web page - Different device viewports are different
- stay pc End : Layout the viewport -width
- On mobile devices ( mobile phone ) Device visual viewport --device-width
Responsive layout conventions :
Visual viewport = Layout the viewport
Not scalable
adopt By meta The label setting is completed Of
meta: The original data of the web page Can pass name Property to get different values , Complete the basic data settings of different web pages
width=device-width Unify the width of the layout viewport and the width of the device viewport
user-scalable=0//scala Zoom means Not scalable
initial-scale=1.0// Initial scaling =1 Indicates no scaling
maximum-scale=1.0
minimum-scale=1.0
Using shortcut keys :meta:vp
The screen width of the device
Ultra small screen extra small <768px
Small screen small 768<= small<992
Middle screen medium 992<=medium <1200
screen large >=1200
According to different screen widths , Make media inquiries , Complete responsive layout
min-width: Minimum page width
max-width: Maximum page width
min-height: Minimum page height
max-height: Maximum page height
Be careful :
- and There are spaces before and after Otherwise, it can't be resolved correctly
- The order of media query is from top to bottom ( Has a coverage effect -- In order to have a correct sequence effect , Let the screen size increase in turn Or decrease in turn )
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> body{ background-color: black; } /*@media Make media inquiries screen What we judge is the size of the screen Of course, there can be others */ @media screen and (min-width: 768px){/* The minimum width is greater than 768 Pixels */ body{ background-color: pink; } } @media screen and (min-width: 992px){/* The minimum width is greater than 992 Pixels */ body{ background-color: green; } } </style> </head> <body> </body> </html>
Third party open source framework bootstrap-- Complete the corresponding layout
边栏推荐
- College degree want to 0 basic programming after looking for a job feasible?
- Non boost ASIO notes: UDP UART socketcan multicast UDS
- Database design
- 组件el-scrollbar的使用
- 20220723 record an unexplained shutdown of SAP Oracle monitoring service
- Detailed comparison between graphic array and linked list, performance test
- [important notice] the third phase of planet online training is coming! Explain how to build your own quantitative strategy on qtyx
- 原生组件、小程序与客户端通信原理、video、map、canvas、picker等运行原理
- Yinshimei Invisalign oral scan referral method (export oral scan data + online consultation)
- 微信小程序之性能优化(分包、运行流程细节、精简结构、原生组件通信)
猜你喜欢

In depth understanding - wechat developer tools

毕业设计校园信息发布平台网站源码

Try to run this command from the system terminal Make sure that you use the correct

Notes - record the solution to the failure of @refreshscope dynamic refresh configuration

Notes - record a dynamic datasource please check the setting of primary problem solving

Cartland number---

Jmeter+influxdb+grafana pressure measurement real-time monitoring platform construction
![STM32 installation tutorial and j-link burning driver installation tutorial [the next day]](/img/09/def640c771f1b9effaaec3844d4cd3.png)
STM32 installation tutorial and j-link burning driver installation tutorial [the next day]

On the possibility and limitation of defi in the metauniverse

新红包封面平台可搭建分站独立后台的源码
随机推荐
The new red envelope cover platform can build the source code of the independent background of the sub station
College degree want to 0 basic programming after looking for a job feasible?
MD5 encryption and decryption website test, is MD5 encryption still safe?
STM32 concept and installation [day 1]
The communication principle between native components, applets and clients, and the operation principle of video, map, canvas, picker, etc
What are the principal guaranteed financial products with an annual interest rate of about 6%?
Exchange 2013 SSL证书安装文档
Detailed comparison between graphic array and linked list, performance test
浅谈领域驱动设计
The difference between.Split (",", -1) and.Split (",")
Phpcms realizes product multi condition screening function
快速排序注意点
async await详解 & Promise
使用第三方账号登录
Mysql database authorization learning
Hundred million financing events account for more than 30%. Where is the next stop for super automation? -- Manfu Technology
Spark partition operators partitionby, coalesce, repartition
NetCore-如何保证ICollection或List私有化不被外部修改?
Exchange 2010 wildcard SSL certificate installation document
文心大模型扬起新“帆”,产业应用大潮已至


