Front-end development of pits encountered on UC browsers

Source: Internet
Author: User

About the width:100% of the flex and textarea of UC;

These days to do a WAP project, Ben thought on the phone do not consider compatibility issues, can be a bold, fuck ie678!

Finish page Development on PC, do page straightening on Chrome emulator, good! Everything seems to be a beautiful look ~ ~

Open the Phone test page, think a little excited about it! Sweep code, ..... Lying trough, what browser this is! Lying trough, is this UC?

One of my most simple pages can not display normally, after all, only two textarea pages ah, I wipe, this can be wrong!?? @@...

Check the code, test the other browser only UC is this, textarea width setting width:100%; The console has the width of body and textarea, respectively 360 and 348. Later found that there is actually a UC development version, can be PC control mobile phone, overjoyed, and then eggs ... No excess padding and margin were found, and the label could be 100% except for the textarea.

Test Connection: http://jielan.sinaapp.com/4.html

Project approximation, you have to get rid of this ugly input box Ah!

In addition to setting the width of 100% There are other ways, lying trough, right, Display:flex; later I gave textarea find a parent element width 100%,textarea flex:1; Good, that's the 100% I want!

Good da, solve the rest of that one, the same is OK, haha, really admire their wit. Add parent element, copy css,ctrl+s, sweep code.

Lying in the groove, silly, and how all is half the width.

(⊙o⊙) Yes! Jiangzi, the project is approaching ... Do you have a swollen!!! Only special uc!!!. Fuck uc!!! ╮(╯▽╰)╭, still have to solve the problem ah, tried a lot of properties are not. Finally delete the replication is wrong, it is OK.

The parent element removes the Display:flex; the child elements are flex:1. width 100%; So UC is full screen.

Don't ask me why, maybe this is love ... Love is not a clear explanation ...

Also, if your flex element is input you need to assign it display:block to allow it to go to the adaptive width. and Inpu to write height, otherwise you input is the height of the lower, and then restore back, really wonderful ...

Don't ask why, maybe it's just the love of UC

Front-end development of pits encountered on UC browsers

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.