The "Front" side has a pitfall and detour (1) -- H5 + CSS, h5css

Source: Internet
Author: User

The "Front" side has a pitfall and detour (1) -- H5 + CSS, h5css

1. No line breaks for numbers and English;

Scenario: I tested the applet yesterday. I entered English and there was no line break. There was a horizontal scroll bar below it;

Solution:Word-break;

Word-break: break-all;/* only applies to English, and uses letters as the line feed basis */

Word-wrap: break-word;/* only applies to English and uses words as the basis for line feed */

White-space: pre-wrap;/* only applies to Chinese characters and forces line breaks */

White-space: nowrap;/* forces line breaks to work */

White-space: nowrap;/* Do not wrap, overflow hidden */
Overflow: hidden;
Text-overflow: ellipsis;

NOTE: The container must have a width.

 

2. Disable mobile Scaling

<Meta name = "viewport" content = "width = device-width, initial-scale = 1, maximum-scale = 1, user-scalable = no">

3. Specify that the web page is rendered using the webkit engine.

Valid only for 360 browsers and 6.5 +. We strongly recommend that you add

<Meta name = "renderer" content = "webkit">

4. Prevent Baidu transcoding code from advertising

<Meta http-equiv = "Cache-Control" content = "no-siteapp"/>

Related Article

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.