Mobile app for iphone Android small icon text layout

Source: Internet
Author: User

Scenario Description:

Display some data in the mobile browser, which is preceded by small icons, requiring: small icons and text horizontally aligned.

Problem Analysis:

There are a lot of solutions to the problem of picture-and-text landscape, but it is still the same line of pictures and words on the display.

Implementation scenarios:

Programme one:

The wording is simple, but this compatibility has a lot of problems.

. m-icon{
Display:inline-block;
Vertical-align:middle;
Padding-right:1em;
Height:1em;
Background-image:url (Icon.png);
Background-size:1em;
Background-repeat:no-repeat;
}
. m-icon.star{
BACKGROUND-POSITION:NPX npx;
}
. m-icon.like{
BACKGROUND-POSITION:NPX npx;
}
. m-icon.share{
BACKGROUND-POSITION:NPX npx;
}
. m-text{
Display:inline-block;
Vertical-align:middle;
Font-size:1em;
}
<i class= "M-icon star" ></i><span></span><i class= "M-icon like" ></i><span ></span><i class= "M-icon share" ></i><span></span>
Tip: This is a very simple notation and can be aligned using the Inline-block attribute of the CSS3, but this is a good display on Android, and the iphone has a noticeable problem with misalignment.

Scenario Two:




Mobile app for iphone Android small icon text layout

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.