Home  >  Article  >  WeChat Applet  >  How to use rpx? Summary of usage examples of WeChat mini program rpx

How to use rpx? Summary of usage examples of WeChat mini program rpx

伊谢尔伦
伊谢尔伦Original
2017-06-11 09:44:465572browse

Abstract: When we are developing WeChat applets, we often encounter situations where we find that the effect of using PX is not ideal when writing style sheets. In daily development, we often use rem and em as pixel units for responsive layout. They are both relative units. rem is relative to the root element of the document and em is relative to the parent element. But when... When we are developing WeChat applets, we often encounter situations where we find that the effect of using PX is not ideal when writing style sheets. In daily development, we often use rem and em as pixel units for responsive layout. They are both relative units. rem is relative to the root element of the document and em is relative to the parent element. But in the official document of the WeChat applet, rpx is used as a responsive layout unit! So what is RPX and how to set it up? Let’s take a closer look today. [color=rgb(44,]rpx (responsive pixel): can be adapted according to the screen width. The specified screen width is 750rpx. For example, on the iPhone6, the screen width is 375px and there are 750 physical pixels in total, then 750rpx = 375px = 750 Physical pixels, 1

1. How should the applet set the rpx unit on different mobile devices?

How to use rpx? Summary of usage examples of WeChat mini program rpx

##Introduction: When we are developing WeChat applets, we often encounter situations where we find that the effect of using PX is not ideal when writing style sheets. Rem and em are commonly used as pixel units for responsive layout. They are relative units. Rem is relative to the root element of the document, and em is relative to the parent element. But... ,

#. #2.

WeChat mini program rpx size unit and style usage detailed explanation

How to use rpx? Summary of usage examples of WeChat mini program rpx##Introduction: This article The article mainly introduces relevant information about the rpx size unit and style details of WeChat mini programs, which can effectively help everyone develop WeChat mini programs and avoid mobile phone size problems. Friends in need can refer to the following

3.

Share a method to make the font size larger and not centered in the preface

How to use rpx? Summary of usage examples of WeChat mini program rpx##Introduction: Scenario: Click on a letter to pop up a modal, and display the letter in the modal. style:.modal{ position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: 600rpx 300rpx 0 300rpx; height: 140rpx ; borderradius: 10rpx; lineheight:...

4. Details on how to set rpx units in mini programs on different mobile devices

How to use rpx? Summary of usage examples of WeChat mini program rpxIntroduction: This article explains in detail how to set the rpx unit in the applet on different mobile devices

## 5. rpx unit of WeChat mini program

##Introduction: rpx unit is the css in WeChat mini program The size unit, rpx can be adapted according to the screen width. The screen width is 750rpx. For example, on iPhone6, the screen width is 375px and there are 750 physical pixels, then 750rpx = 375px = 750 physical pixels, 1rpx = 0.How to use rpx? Summary of usage examples of WeChat mini program rpx

6.

Also talk about the replace function of String class in JavaScript_javascript skills

Introduction: I recently read sharpxiajun's blog post "Javascript Notes-Some Things About the String Class Replace Function". I feel that it is well written and very helpful. How to use rpx? Summary of usage examples of WeChat mini program rpx

[Related Q&A recommendations]:

javascript - How does webstorm make css support rpx?

The above is the detailed content of How to use rpx? Summary of usage examples of WeChat mini program rpx. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn