"Notes" method for vertically centering elements in the UC browser and in the mobile browser

Source: Internet
Author: User

There are many ways to get the vertical center of CSS, but the UC browser is really a mobile browser in the clear stream of mudslides!!

Recently in the MU Class network learning Vue webApp, one of which is to let the text inside the element and the icon vertically centered

There is no difference between the chrome on the computer and the default browser of the mobile browser, except that the UC browser opens with a little bit of bias, so it's uncomfortable to match the properties of the vertical-align. Finally found a way

Look at the code first

<!--pop-up layer display button -      <Divv-if= "Seller.data.supports"class= "Seller-support-num-btn">        <spanclass= "Support-count">{{Seller.data.supports.length}}</span>        <Iclass= "Icon-keyboard_arrow_right"></I>      </Div>

. seller-support-num-btn. Support-count {    vertical-align: Super;     font-size: 10px;} . seller-support-num-btn. Icon-keyboard_arrow_right {    vertical-align: top;     margin-left: 2px;     line-height: 24px;     font-size: 10px;}

Key code on the text and icon elements of the vertical-align set the text to super and the icon is set to top on it.

As for the principle, wait for my research and research to add ...

"Notes" method for vertically centering elements in the UC browser and in the mobile browser

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.