The attr () feature has already appeared in the CSS 2.1 standard, but it is now popular. It provides an ingenious way to use the attributes on HTML tags in CSS, and in many cases it saves you the process of needing JavaScript processing in the past.
How do I make a div centered
The main style definitions are as follows:
body {text-align:center;}#center {Margin-right:auto; Margin-left:auto; }
Description
First, the parent element defines text-align:center, which means that the content
Here are three examples:
1, use: Before and: After adding a background, such as a paragraph of text before and after the quotation marks;
2, use: Before,: After, Box-shadow achieve 3D shadow effect;
Use: Before,: After, Box-shadow to achieve the
First, remove the underline of the hyperlink and implement the mouse hover color on the hyperlink:
By default, hyperlinks in Web pages designed with Dreamweaver are underlined and look unattractive. To get rid of these annoying underscores,
IE vs FF CSS Compatibility essentials: DOCTYPE affects CSS processing Ff:div Set Margin-left, Margin-right is already centered when auto, IE not good ff:body set text-align, Div needs to set Margin:auto (mainly margin-left,margin-right) to
Using abbreviations can help reduce the size of your CSS files and make it easier to read. The main rules for CSS abbreviations are as follows:
Color
16 The color value of the binary, if the value of each two digits is the same, you can abbreviate
When a link gets the focus, the default is a dotted box. As shown in figure:
In Firefox can use-moz-outline:none; or Outline:none; To remove it. So we can write this: code is as follows: A:focus {
Outline:none;
-moz-outline:none;
}
By the
Because of the browser (IE, Gecko, opera ...) The rendering of the CSS is different, resulting in differences in display, so you can load a different way to solve the CSS, the following introduction to the next two methods to achieve, not
This article introduces CSS layout positioning properties, skilled use can easily achieve beautiful site layout, interested friends can refer to, I hope to help you
CSS Positioning properties: Bottom, left, right, and top position Clip
In IE kernel browser or Firefox browser can be centered, there is no center can use its special tags to set the center but in Google browser to see when the bug can not be centered, the following solution has a similar situation friends can refer to
Codepen is a great website and a mecca for global Web front-end developers!
I searched for some of the best and most popular codepen (HTML and CSS only). If you can integrate them into the design, it will save a lot of time.
In the example below
Using CSS abbreviations can reduce the paging file size, improve download speed, and make the code concise and readable.
Such as:
div{
border-top:1px solid #cccccc;
border-left:1px solid #cccccc;
border-right:1px soli #cccccc;
This article illustrates the Js+css method for implementing drag paging effects. Share to everyone for your reference. The implementation methods are as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26-27-
Olivier Staub
This is the photographer Olivier Staub's works display website, the website does not have too many text content, lets the picture express own artistic conception.
Open branddesign Gmbh
The author of the website tries his
This article mainly introduces the selection of CSS in the summary and efficiency comparison, including pseudo-class selectors and pseudo-element selectors, the need for friends can refer to the following
As we all know, CSS is additive (the same
This article describes the use of CSS to draw an example of a Taiji figure (yin and yang gossip)
#yin-yang {width:96px;height:48px;background: #eee; border-color:red;border-style:solid;border-width:2px 2px 50px 2px;border-radius:100%;p
Let's look at table below, why is the table layout that used to be so brilliant in those years? What are the characteristics of her? Discard table compatibility, SEO, loading and so on, not related to this article, just look at the attributes, then
In order to achieve a unified page effect, you need to write a specific CSS style for different browsers or different versions, we put this to different browsers/different versions of the corresponding CSS code process, called CSS hack! for many
1. Combination of border
Border:border-width Border-style Border-color;
Border-width: Border width, cannot be a percentage, because it will not change according to the device width; similarly, outline | Text-shadow | Box-shadow also can
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