ViewpointCSS3 provides some elements related to the current viewpoint, Vw,vh,vim and so on."viewpoint" = window sizeVW = 1% of viewport WIDTH1VH = 1% of viewport height1vmin = 1VW or 1VH, min 1vmax = 1VW or 1VH, maximumCompatibility: Chrome 20+/Safari 6+/IE +/FF 19+/IOS 6+Font Size Adaptive screen resolution CSS Solution
CSS controls the font size of the H1 tag on the webpage. The H1 tag is often used in the webpage design to optimize the keyword, but the font is really uncomfortable. Let's get rid of it!With CSS, you can easily solve the following problems:Www.111cn.net is a technical r
Code: (You need to set the display property to Inline-block, set the height and line-height to adjust the position)//Brand Click $ (". Li-brand"). Click (function () {var str = ""; str + = "Divstyle= ' display:inline;border:1pxSolid orange;padding:4px '>Brand: "+ $ (This)." Text () + "emstyle= ' display:inline-block;height:14 px;line-height:15px;cursor:pointer;border:1pxSolid Orange '>Xem>Div>"; $ (". Select-brand-x"). html (str);});CSS------Border
; height: 3rem; line-height: 3rem; font-size: 1.2rem; display: inline-block; background: #06c; color: #fff; border-radius: .5rem; text-decoration: none; text-align: center; }
In this case: 20px = 1rem in the root element (font-size = 20px)
General Standards
4. media query settings can also
Copy codeThe Code is as follows:/*Increase, decrease, and restore the original font size on the page.Three elements need to be defined in the html pageThe element classes are resetFont, increaseFont, and decreaseFont.The JQuery events in this file define the click events of the three elements to increase, decrease, and restore the original size.*/$ (Function (){/
http://ued.taobao.org/blog/2013/05/rem-font-size/Above review:In the preamble we have mentioned some basic concepts of response, such as:Responsive Web pages not only respond to different types of devices, but also respond to different user needs. The original intention of the response is to make the information better communicated and accessible to all, and this is the original intention of the Web.The pre
Copy Code code as follows:
/*
increase, shrink, and restore the original size of the font on the page
Need to define three elements in an HTML page
The class of the element is Resetfont, Increasefont, Decreasefont
The three-element click event is defined in the jquery event in this file to increase, shrink, and restore the original size
*/
$ (function
Above review:In the preamble we have mentioned some basic concepts of response, such as:Responsive Web pages not only respond to different types of devices, but also respond to different user needs. The original intention of the response is to make the information better communicated and accessible to all, and this is the original intention of the Web.The preamble also mentions that responsive design should uphold the "content first, mobile first" des
Sometimes, because of the visitor's browser setup problem, your page looks different to others than you expect.
Are we the only ones who are "still slaughtered"? No, here's how to get your page fixed by your thoughts.
1 language encoding of text
Your Chinese page may be in someone else's browser is displayed as garbled, this is because someone else's browser text encoding is not Simplified Chinese. Add the next sentence between 2 fixing of the font
JQuery: code example for setting the font size and jquery font size
JQuery:Setting the font size on a webpage is a common operation. The following describes how to implement this function through code examples.The Code is as follo
This article mainly introduces how to set the font size of the HTML font tag, this is actually similar to CSS, but the other two font tag properties can not be used, with CSS instead, but we should introduce the introduction, lest
This paper is transferred from Nuggets netSo many articles talk about how the responsive Web site is laid out, how it is implemented using CSS, and how blah blah. However, we have forgotten a very important point--------responsive control of font size.Many of today's web sites, from a layout standpoint, are
Set the character size font-size to 100%, font-size100 %
Set font-size to 100%:In the Code, there are often some strange code that can play an extraordinary role. The following describes how to set the
Jquery Set Font size (font-size) and row height (line-height)
var cssfontsize=$ (". Txt_container"). CSS (' font-size ');var csslineheight=$ (". Txt_container").
before doing desert education, direct to the design map, and then rape, scale processing. Simple. Straight, Rough! However, development is fast. ...... Once! But that is, now developed, as the industry conscience: can't do that! (That was forced.)First look at the code:@media screen and (max-width:362px) and (min-width:330px) {html{font-size:60%;}. top-banner{//font
the elements of the technique, add the vertical direction of the padding-top value of the element, using the form of a percentage, the value is relative to the width of the element, such as the width of a picture above me is 1024px, height is 316px ; so now thePadding-top = (Height/width) * 100% = (316/1024) * 100% = 30.85%; but only for the image height and width scaling release vessel Not enough, we must also add background-size:cover, so that the property to fill the background of the elemen
, such as the width of a picture above me is 1024px, height is 316px ; so now thePadding-top = (Height/width) * 100% = (316/1024) * 100% = 30.85%;But only for the height and width of the image release vessel not enough, we must add background-size:cover, so that the property to fill the background of the element, but IE8 and the following does not support the property, so in order to be compatible with the browser under IE, we need to add a property Background-position:center; At the same time,
Before doing desert education, direct to the design map, and then rape, scale processing. Simple. Straight, Rough! However, development is fast. ...... Once!But that is, now developed, as the industry conscience: can't do that! (That was forced.)First look at the code:@media screen and (max-width:362px) and (min-width:330px) {html{font-size:60%;}. top-banner{font
Add font and color styles ------- CSS and font styles ------- cssControls the font, style, and color of text by using CSS.
1. Basic operations:
1 body{ 2 font-family: Verdana, Geneva, Tahoma, sans-serif 3 } 4 5 body{ 6
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.