CSS operations have an important approach: CSS ()
CSS () has three different syntax to complete their work:
$ (selector). CSS (Name,value)$ (selector). css ({properties})$ (selector). CSS (name)
Return CSS Property use CSS (name) to return the
Friends, Bai front-end architect CSS Magic "Secrets of the CSS", has been published, and presented a copy of me. After looking at this book, there are many CSS tips. So you will have a big harvest, here to help him publicize it! Today's case, but
Difference Analysis
First of all, we all know that Display:none and Visibility:hidden can play the role of hiding elements.
The difference between the two is that the document flow is occupied
Display:none hidden elements while removing the space
Define four pseudo classes of link styles1: link 2: visited 3: hover 4: activeBecause we need to define the link style, it is essential to write the anchor tag -- a, anchor tag and pseudo-class link in the hyperlink, which is the basic
The first point is consistent with mine, but I changed it to position: absolute, and the problem still exists. The second and third points do not match my situation.The next step is layer-by-layer Tracing. We find that we can add "position: relative;
You can define a style based on the context of the element in its position to make the tag more concise. In CSS1, the selectors that apply rules are called contextual selectors because they depend on context relationships to apply or avoid a rule.
Z-index specification reference• In W3C CSS2.1, each element has a three-dimensional spatial location, except for the horizontal and vertical positions we are familiar, the elements can be stacked on the "Z axis" and arranged forward in sequence;•
The principle is simple: Set left and top to 50% to locate the div in the center of the browser, and then set the margin-left and margin-top values to half width and height.To center the div.Add this: The code is as follows:Copy code 1
Let's take a look at the effect picture.This is our common tips tip effect, exquisite and nice-looking. The code is as follows:Copy code implementation of small and medium-sized triangles in Tip! small and medium triangles in Tip! &
The code is as follows:Copy code Table {Table-layout: fixed;}Td {White-space: nowrap;Overflow: hidden;Text-overflow: ellipsis;} Resolution: 1. table-layout: fixed because the default value of table-layout is auto, that is, the width and height
Let's first look at a style. What if we set the element border:TestIt seems that I can't see anything. Let me add different colors to the four borders. Let's take a look:TestDid you find something? Right. Let's remove the text in the middle: In this
Do not wrap (do not wrap) OverflowVersion: CSS2 compatibility: IE4 + NS6 + inheritance: None Syntax: Overflow: visible | auto | hidden | scroll Parameters: Visible: Do not cut the content or add a scroll bar. If this default value is explicitly
I. Use CSS abbreviationsUsing abbreviations can help reduce the size of your CSS file and make it easier to read. For the main rules of css abbreviations, see common css abbreviations syntax summary, which is not described here.II. Define the unit
Friends who learn WEB standards generally start learning CSS. Why? Because CSS is a very interesting language, it can make our webpage ever-changing. Maybe our first contact was because the style of the link was modified, and then we found that CSS
1. Solve the problem that the background cannot be extended The code is as follows:Copy code The above problem shows that the adaptive height of the background does not inherit the float height. Solution:Add 2. How to align webpages
1. A general navigation bar. The difference is that only one background image is used, such as the left image.2. Initial Status: The background is the upper half, and the flip is the lower half. The code is as follows. # Nav {Width: 400px;Text-align:
This is the first day of work around in the past half month. I think that this tutorial has not been completed yet, and I feel very uneasy. I just resigned two months ago and wanted to complete all the tutorials. However, due to an unfortunate
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