WeChat mini-app css style media tag

Source: Internet
Author: User
This article mainly introduces the basic knowledge of small programs about css style media labels. For more information, see Basic knowledge of applets css style media labels

Preface:

In the applet, I met something new for me, but it is not a new knowledge for front-end development. The media tag in the html page is recorded here for emergency purposes.

Timeline style. This makes the document more print, such as increasing the page width or shielding unnecessary content.

 
  
 

@ Media all {body {font: 12px; width: 100% ;}@ media print {body {font: 14px; width: 595px ;} /* set the width to 595px (A4) when printing )*/}

The preceding media tag is the standard syntax in css. all browsers support media tags, but the following statements show that IE6 \ 7 \ 8 are supported by all browsers.

CSS code

@media all and (min-width: 1001px) {  #sidebar ul li a:after {   content: " (" attr(data-email) ")";   font-size: 11px;   font-style: italic;   color: #666;  } } @media all and (max-width: 1000px) and (min-width: 700px) {  #sidebar ul li a:before {   content: "Email: ";   font-style: italic;   color: #666;  } } @media all and (max-width: 699px) and (min-width: 520px), (min-width: 1151px) {  #sidebar ul li a {   padding-left: 21px;   background: url(../images/email.png) left center no-repeat;  } }

Someone is doing this.

@media screen and (-webkit-min-device-pixel-ratio: 1.0), screen and (min--moz-device-pixel-ratio: 1.0), screen and (min-device-pixel-ratio: 1.0), screen and (min-resolution: 1.0dppx) {  .icon-del {background-image: url(../../resources/images/ui_3@2x.png);background-size: 274px 228px;display: block; }}

Thank you for reading this article. I hope it will help you. thank you for your support for this site!

For more articles about small program css style media labels, please follow the PHP Chinese network!

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.