Css style tutorial: text-and-image mixing [under the text on the image]

Source: Internet
Author: User
Tags mixed

Css style tutorial: text-and-text layout [under the text on the figure]. The title is messy because it doesn't know how to write it, next, let's take a look at the mixed text and mixed text effects and you will know how it works.

View the css layout code.

The code is as follows: Copy code
<Ul class = "hotGroup">
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
<Li> <a href = "#"> </a> <span> Circle name </span> </li>
</Ul>

Isn't the style code very concise? Let's take a look at how the css style is controlled.

 

The code is as follows: Copy code

Ul. hotGroup, ul. livelyGroup {
Padding-top: 12px;
}
Ul. hotGroup li, ul. livelyGroup li {
Float: left;
Width: 65px;
Text-align: center;
}
Ul. hotGroup li a, ul. livelyGroup li {
Display: block;
Height: 50px;
Width: 50px;
Background-color: # CCCCCC;
Margin-right: auto;
Margin-left: auto;
White-space: nowrap;
Overflow: hidden;
}
Ul. hotGroup li img, ul. livelyGroup li img {
Height: 50px;
Width: 50px;
}

Ul. hotGroup li span, ul. livelyGroup li span {
Line-height: 22px;
Display: block;
Height: 22px;
Width: 50px;
Margin-right: auto;
Margin-left: auto;
White-space: nowrap;
Overflow: hidden;
}

The last part is over. Please specify www.111cn.net for original site reprinting.

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.