Center horizontally, if you know the width of an element, you can use the
The code is as follows
. cell{width:300px margin:0 Auto; text-align:center;}
If the inline element is centered, use the text-align:center directly.
If the element width
Literal property identifier Action attribute value
Font-family: Define type of text, order to find, first find the selected value, if you can not find the default value of the song, bold, etc.
Font-style: Defines font style. Normal (standard)
A simple style
The easiest thing to do with CSS is to set a different font style for our headings. We can create a CSS rule that will apply the style to all tags that appear in the page (or the entire site, when using an external style sheet).
CSS sprites refers to the Web page many small pictures (many icon files) into a regular arrangement of a large picture, in the display of the time through the Background-image, Background-position shows the same effect as a small picture that a
This article mainly introduces the JS batch operation CSS Properties. Need friends can come to the reference, I hope to help you. Code as follows: We write CSS styles in JS usually in the following two ways: in general, we use JS to set the
CSS () method to set or return one or more style attributes for the selected element, here are a few good examples where you can feelSet CSS properties to set the specified CSS properties, use the following syntax: The code is as follows: CSS
When you develop a Web site or Web application, there are the right tools that will definitely help you save a lot of time. In this article, I have collected a very useful CSS development tools.
For WEB developers, finding useful CSS development
Brief tutorials
This is a team who uses pure CSS3 to introduce animation effects. The effect is laid out using the bootstrap grid system, where the description will have some animated effects when the mouse hovers over the pictures of each team
There are three types of CSS written in the format
Inline style: meaning to write styles within a row
For example, say Write my colors in inline styles
Applies only to (font color and background color) and labels, but not to for example: Head,
We can animate through CSS, and here's what I'm going to show you are the rotation of P, the animation of color transitions
move the mouse over the rectangle below: two seconds to rotate the
The effect of their own test, very gorgeous
Each element in the document is depicted as a rectangular box. The purpose of the rendering engine is to determine the size, attributes-such as its color, background, border-and the location of the boxes. In CSS, these rectangular boxes are
Preface
The clever design of CSS, the realization of the delicate, thin ruminate, its wonderful, marvelous. This wave line, trickery the use of the Linear-gradient attribute, the combination of angle, color, position in one, with
percent Value of 1.margin the percentage of ordinary elements Maigin is calculated relative to the width of the container element (width).
Here we set a container with a width height of 800 * 600, respectively, outside the picture. Set img{margin:
CSS hover changes child elements and other element styles
+ Represents the next Level element,> represents a child element
element 1 element 3 element 2
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
In many page production will be designed to highlight a triangle, below gives a compatible with a variety of browser design methods:
&L T;style type= "Text/css" >. corner-top{width:0px; height:0px;
The underlying child element selector can only be looked down at the first level, not across
HTML code:
This is my web page.
CSS code:
P>strong {color:purple;} p>strong>i {font-size:50px;}
1. The child element selector can only select
Link underline is a very common style, recently made a very simple visual effect, very good, full code view.
js bin Hover over Me
Creating this effect is very simple and does not require adding additional DOM elements to the HTML, but
The box is the basic concept in CSS, and we need to use it to configure the appearance of the elements and the overall layout of the document.
1. Apply padding to elements
The app padding adds white space between the element content and the
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.