Several common CSS styles in Web pages

Source: Internet
Author: User
Tags filter
css| Web page · 1. The two ends of the text are aligned: text-align:justify; Text-justify:inter-ideograph;

· 2. Fixed-width Chinese character truncation: overflow:hidden;text-overflow:ellipsis;white-space:nowrap (although only the truncation of text on one line can be processed, multiple lines cannot be processed.) ) (IE5 above)

· 3. Fixed width Chinese character (word) folding line: table-layout:fixed; Word-break:break-all; (IE5 above)

· 4.<acronym style= "Cursor:help" title= "Enter text to Prompt" > text </acronym> put the mouse on the front text to see the effect. This effect in many foreign sites can be seen, while the domestic few and few.

· 5. The picture is translucent:. halfalpha {background-color: #000000; Filter:alpha (OPACITY=50)} passed in IE6 and IE5 tests, FF failed.

· 6.FLASH transparent: Select SWF, open the original Code window, before </object> enter <param name= "wmode" value= "Transparent" > We often use to do the Web page to put the mouse on the picture will appear to brighten the effect of the picture can be replaced by the technique, you can use the following filter, the code is as follows:

. Pictures img {filter:alpha (opacity=45);}
. Pictures a:hover img {filter:alpha (opacity=90);}

· If the text is too long, the long section becomes an ellipsis display: IE5, FF is invalid, but can be hidden, IE6 valid
<div style= "width:120px; height:50px; BORDER:1PX solid blue; Overflow:hidden; Text-overflow:ellipsis ">
<NOBR> is for example, there is a line of text, very long, a row in the table does not show .</nobr>

· Title line-wrapping notation or in IE may change the annotation to:<!--[if! Ie]>
Put your commentary ...
<! [endif]-->

· How to invoke external font syntax with CSS: @font-face {font-family:name; Src:url (URL); Srules} value:
Name: Font names. The value of any possible font-family property
URL (URL): Specifies the OpenType font file using an absolute or relative URL address
Srules: Style sheet definition

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.