(1) css code accumulation-code that you often forget but cannot remember, css code

Source: Internet
Author: User

(1) css code accumulation-code that you often forget but cannot remember, css code

1. transparency settings

90% transparency: filter: alpha (opacity = 90);-moz-opacity: 0.90;-khtml-opacity: 0.90; opacity: 0.90;

80% transparency: filter: alpha (opacity = 80);-moz-opacity: 0.80;-khtml-opacity: 0.80; opacity: 0.80;

70% transparency: filter: alpha (opacity = 70);-moz-opacity: 0.70;-khtml-opacity: 0.70; opacity: 0.70;

60% transparency: filter: alpha (opacity = 60);-moz-opacity: 0.60;-khtml-opacity: 0.60; opacity: 0.60;

50% transparency: filter: alpha (opacity = 50);-moz-opacity: 0.50;-khtml-opacity: 0.50; opacity: 0.50;

40% transparency: filter: alpha (opacity = 40);-moz-opacity: 0.40;-khtml-opacity: 0.40; opacity: 0.40;

30% transparency: filter: alpha (opacity = 30);-moz-opacity: 0.30;-khtml-opacity: 0.30; opacity: 0.30;

20% transparency: filter: alpha (opacity = 20);-moz-opacity: 0.20;-khtml-opacity: 0.20; opacity: 0.20;

10% transparency: filter: alpha (opacity = 10);-moz-opacity: 0.10;-khtml-opacity: 0.10; opacity: 0.10;

Completely Transparent: filter: alpha (opacity = 0);-moz-opacity: 0;-khtml-opacity: 0; opacity: 0;

 

2. Word spacing/letter spacing and word spacing

Character spacing (letter spacing): letter-spacing: 5px

Word spacing: word-spacing

 

3. for single-choice buttons in the same group, the value of name must be consistent. In this way, the single-choice buttons in the same group take effect.

 

4. Online QQ link settings

<A target = "_ blank" href: "http://wpa.qq.com/msgrd? V = 3 & uin = qq number & site = qq & menu = yes "> </a>

 

5. Special characters in copyright

<Span style = "font-size: 14px; font-family: Arial, Helvetica, sans-serif;" >&# 169; </span>

 

6. One-click call result phone number
<A href = "tel: // phone number"> </a>

 

7. Forcibly fold the numbers and letters

Word-wrap: break-word; break-word: break-all;

 

8. Transparent background color

Background: rgba (0.6, 0 );

 

9. The onclick event of the button opens a new page/local page

The current page jumps directly to the new page: <input type = button onclick = "window. location. href ('connection')">
You need to open a new page to jump, which is equivalent to the target = "_ blank" attribute of tag a: <input type = button onclick = "window. open ('connection')">

 

10. rounded rectangle code

Border-radius: 5px; border: 1px solid # fc959f; padding: 5px;

 

11. Notes

A single line comment starts. Multi-line comments start with/* and end.

Use/* Comment statement */In CSS */

Used in HTML <! -- Comment -->

 

12. Return to the previous page

Javascript: history. go (-1 );

 

13. Mobile phone screen

<Meta name = "viewport" content = "width = device-width, initial-scale = 1, minimum-scale = 1, maximum-sca "/> <% -- adapted to mobile phone screen -- %>

 

14. linear gradient-not commonly used

Background: linear-gradient (rgba (50, 60, 60, 1), rgba (50, 60, 60, 0.7 ));

 

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.