Full use of CSS for instance
The code is as follows
Copy Code
Using JS to Example
HTML code
The code is as follows
Copy Code
JS Codevar fancyform = {Start:function (elements,
Tip: You can modify some of the code before running
pure CSS Lightbox effect
(without JS) Close< ;/div>
Tip: You can modify some of the code before running
Tip: You can modify some of the code before running
with CSS star rating code added star selector for behavior & Lt;p> presentation layer code originated from China Web first stop, I write only the behavior. service
In the previous article, we have already mentioned the usage of CSS attributes such as positioning, layout, and CSS size. Today we will talk about the other two important attributes of CSS, Margin) and Padding (inner Padding ). These two attributes
The "@ keyframes" animation attribute in CSS3 can be used to implement some dynamic special effects. You can learn the specific syntax and parameters on the internet. This article mainly applies this animation attribute to realize the special effect
CSS relative positioningRelative positioning is a very easy-to-understand concept. If an element is relatively located, it appears at its location. Then, you can set the vertical or horizontal position to move the element "relative to" its start
Chrome, Firefox The code is as follows:Copy code One code supports IE The code is as follows:Copy code Html {filter: progid: DXImageTransform. Microsoft. BasicImage (grayscale = 1 );}
IE6 does not support CSS position: fixed, so it needs to be written in other ways.There are many solutions that can be found on the internet. They are listed on the following webpage as references. If you are interested, you can study the solution
Method 1:Highly adaptive with pure CSS: The code is as follows:Copy code . Content {overflow: hidden ;}. Left,. center,. right {padding-bottom: 500px; margin-bottom:-500px ;} Method 2:Add the following JS code before : The code is as
Example 1Uncertain height vertical center The code is as follows:Copy code /* Center . Vetically {Vertical-align: middle;Display: table-cell;* Position: relative;}. Vetically_C {Display: block;Margin: 0 auto;Text-align: center;* Position:
The habit of writing CSS determines the speed of page rendering, which is more obvious in IE. Developing good habits and standards will allow you to load your pages more quickly and enjoy a higher user experience. Below are some tips for improving
Adaptive layout of three columns in the absolute positioning method: The code is as follows:Copy code absolute positioning method Note: Three div elements can be interchangeable.Self-floating method, three-column layout adaptive: The code
Add Add css: input {behavior: url (# default # savehistory )};E.g. The page contains Enter the input value and refresh the page. The input value is still inExample The code is as follows:Copy code Input {behavior: url (# default # savehistory )
Css prevents image sizes from being too largeAdd the following CSS: The code is as follows:Copy code Img {Max-width: 800px;Height: auto;} In the code, max-width: 800px limits the maximum image width to 800 pixels, while the following hight:
Thanks to @ Lin Xiaozhi's blog, let me know that the IE transition filter + CSS3 rgba can be perfectly implemented.The specific implementation code is as follows: The code is as follows:Copy code . Transparent {Background: rgba (0, 0, 0, 0.3
Once I wrote a web page, it was not difficult to learn css as a whole, but it was just element positioning, and I had always had a thorough understanding. Today, based on the concept of practice, after careful testing, I have concluded the following
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