Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the common styles of CSS/CSS3

Shulou Source: shulou.com Published: 2022-06-03 08:39:55 10月01日 Update

This article mainly explains "what are the common styles of CSS/CSS3". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what CSS/CSS3 styles are commonly used.

1. Force single-line display of text: white-space:nowrap

two。 Set the overflow text to be displayed as an ellipsis mark: text-overflow:ellipsis

(note: text-overflow:clip | ellipsis | ellipsis-word; (new to css3)

Where clip represents directly trimmed spillover text

When the value ellipsis indicates a text overflow, the ellipsis mark (...) is displayed, and the ellipsis mark replaces the last character.

When the value ellipsis-word indicates a text overflow, the ellipsis mark (...) is also displayed, except that the ellipsis mark is replaced by the last word).

3. For example, a piece of code:

When clicking on the picture inside the a tag, there is a dotted frame, and there is a frame in the picture in IE. How to solve it?

Solution:

A {outline:none;} / / is mainly for browsers such as Firefox, but not for IE

Img {border:0;}

A:active {noOutline:_expression (this.onFocus=this.blur ());} / / resolve the dashed wireframe in IE6,IE7.

For a tags, the general simple solution is:

Add js control to the a tag and force it to cancel focus when the a tag is focused, so that the a tag will not have a dotted wireframe.

Tags: Color table element attribute text code label number position style parameter letter support method tag border picture uppercase uppercase size Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi macOS Shulou Information Docker Shulou Technology