represented by 4 physical pixels. The 1px border of the retina screen,In fact, the original intention of the designer is 1 physical pixels. It is conceivable that for programmers, the CSS should be implemented in the 0.5 CSS pixel border, which is why the designer always feel that the dpr=2 screen 1px line is very thick.Bit image is the concept used when working with high-definition images. When 1 physical pixels can represent a 1-bit image, the picture is clear. What we usually call X2 times i
, while the layout brings a fault-switching transformation in response to the breakpoint switching. Like a cassette player, "Click and click" For a second.By using the dynamic calculation of the REM unit of the elastic layout, it is necessary to embed a script in the head to change the listening resolution to dynamically change the root element font size, so that the CSS in the JS coupled together.Is there any way to solve this problem?The answer is y
What is REM
In my opinion, REM is the pixel value of the HTML node fontsize, which is the 1rem unit. So changing the fontsize of HTML nodes is the most critical step. Depending on the width of the phone to change the relative size can be achieved by adaptation, there is no need for any media to query those.
Our designs are often 640 or more wide, but I suggest using this size to 640 as the benchmark, to s
Ado|command| Object |ado Sql= "SELECT * from Jtopic ORDER BY j_id Desc"
Rs.Open sql,conn,1,1
%>
Rs.movenext
Loop
%>
+++++++++++ sort_in.asp +++++++++++++++++++++++++++++++++++
Dim cmdtemp
Select Case Request.Form ("Options")
Case "Rename"
On Error Resume Next
Set cmdtemp = Server.CreateObject ("Adodb.command")
Set Rs=server.createobject ("Adodb.recordset")
Cmdtemp.commandtext = "SELECT * from Jtopic where j_id=" Request.Form ("Jtop")
Cmdtemp.commandtype = 1
Set cmdtemp.activeconnection = co
Rem statement
Contains the explanatory comments in the program.
RemComment
Or
'Comment
CommentThe parameter is the annotation text to be included. InRemKeyword andCommentThere should be a space between them.Description
As shown in the "Syntax" section, you can use single quotes (').RemKeyword. IfRemKeywords and statements must be separated by semicolons in the same line. However, if you use single quotes, you do not need to use a semicolon betwe
Learn more about the EM,REM,PXpx pixels, relative length units. Pixel px is relative to the display screen resolution, in the Web page, we use PX to set the text, PX is more stable and accurate, but this method has a problem, when the user in the browser to browse our web page, it changed the browser font size, This will be broken using our web page layout. You can then use EM to define the font for the Web page.EM is also a relative length unit, rela
Summary:In front of you to share a react project (http://www.cnblogs.com/xiyangbaixue/p/4751904.html), this time on the project to make some improvements, Added REM layout and optimized for Iscroll on Android.Project code, Welcome to fork and Star, online previewREM Layout Instance Codevar function () { var doc = document.documentelement, cli = doc.clientwidth; CLI (cli/=320,2 }fontsizeinit (); Window.addeventliste
For a small number of mobile devices only need to fit, and the resolution of the page has little impact, the use of PX canFor devices that need to be adapted to a variety of mobile devices, use REM, such as a device that only needs to be adapted to different resolutions, such as iphone and ipad.REM Configuration reference:Html{Font-Size:10px}@mediaScreenand (Min-Width:321px) and (Max-Width:375px){Html{Font-Size:11px}}@mediaScreenand (Min-Width:376px)
:
w" idth
set layout viewport width as a positive integer, or string " Width-device "
Settings page The initial scale value, which is a number, can be taken with decimal
minimum-scale allowed The minimum zoom value for a user, which can be a number with decimal
maximum-scale Allows the user's maximum zoom value to be a number, with decimal
Set the height of layout viewport , this property is not
For a small number of mobile devices only need to fit, and the resolution of the page has little impact, the use of PX canFor devices that need to be adapted to a variety of mobile devices, use REM, such as a device that only needs to be adapted to different resolutions, such as iphone and ipad.html{font-size:10px}@media screen and (min-width:321px) and (max-width:375px) {html{font-size:11px}}@media screen and (min-width:376px) and (max-width:414px) {
Direct on Dry Goods1,DPR Apple cell phone pixel is 2 ordinary Andro is 1 that is 1 pixels under the apple Pixel point is Andro twice times so a need to 15x15 display of the image Andro only need to provide 15x15 to show clearly the Apple phone needs to 30x30 you can use to detect different types of mobile phone load different size map To ensure that the pixelIt is recommended to use Big Apple images and then convert them into different sizes.2,rem Imp
1. Media query:@media only Screen and (max-width:) {}, when initially doing the PC side, use a variety of media queries, because the PC has a total number of screens, not too cumbersome to reuse the class name. There is a big drawback is that the UI gives the design of the width is certain, in the response to the feeling is a super uncomfortable aesthetic tangle. 2. Percent: Percent is also quite troublesome, but also to go to various calculations, not the programmer should do cumbersome things.
JS in the code into their own HTML page, the page all about the size of the settings can be replaced with REM, such as the use of REM instead of PX, you can make the screen large content scaled up, is all the content Oh, if you project all the content uses REM.REM Adaptation in mobile apps
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.