For fixed-width, non-floating elements we can use margin:0 Auto to center horizontally in CSS, and we also have a common technique for variable-width floating elements to solve its horizontal center problem. There are a number of ways to solve the
This can also use CSS to achieve AH! In order to demonstrate the convenience, here uses the JavaScript code to control the poker switch, quite good.
playing Cards with css3!
♠♥♣♦ a♠♠a♠Spades a♥♥a♥Hearts a♣♣a♣clubs a♦♦a♦Diamonds select
Pure CSS pull-down menu support IE6 IE7 Firefox &
lt;/title> xhtml/css Standard Tutorials Technical Articles FAQ & lt;/li> Layout Tutorial Topics css menu Browser compatible scroll bar related Fillet Rectangular Special topic
The appearance of input file under system defaults:
We change the default appearance of the system by defining the border of input:
If you want to make the navigation button more beautiful, we want to define its background color, and even want to
1. Break down your style
For small projects, before writing code, divide the code into pieces and annotate it by page structure or page content. For example, you can continue working by dividing global styles, layouts, font styles, forms, comments,
Very simple navigation bar, put here has been convenient to use later;
Ie7/ie7/firefox have been tested; no problem;
Copy Code code as follows:
*{padding:0; margin:0 font-size:12px; line-height:1.7; Font-family:verdana,
There are 4 common ways to associate HTML documents with CSS:
Using the link tag
Use the STYLE element
Using the @import directive
Use the inline style of the style property (inline style)
This is the red word
In practice, inline styles
Method One,
Note: This method uses CSS3, no pictures, compatible with a variety of WebKit browser, while compatible with ie8+. First figure:
1. First is the HTML code, relatively simple, only need a simple UL and Li can
The code is
Center up or down
The code is as follows
Copy Code
div{position:fixed;Margin:auto;left:0;right:0;top:0;bottom:0;width:200px;height:150px;}
If only need to center, then put bottom:0; or top:0; You can delete
Opacity set Transparency
Add opactiy to the properties of a picture
Example
The code is as follows
Copy Code
Img{opacity:0.4;Filter:alpha (OPACITY=40); /* for IE8 and earlier versions * *}
In fact, as long as
Do not use positionIn this case, each layer follows the HTML positioning rules. The left, right, top, and bottom positioning information is invalid, and the z-index will not work because there is no cascade.2. Use absoluteIf the z-index attribute of
HTML has tags and CSS has selectors. The selector is used to name internal and external styles.Each selector has attributes in {}, such as simple points like color, font-weight or background-color.Values are separated by semicolons after colons (not
I am doing the DIV layout code in this way. I don't know what to say, but I don't know what to say. Let's take a look.I divide the class into two types: layout class, style class, layout class is skeleton, style class is clothesFor example:For
We have seen various input buttons defined by CSS, but the select statement cannot be implemented simply by defining input. The following provides another css definition method to dazzle your select.CSS section: The code is as follows:Copy code .
This tutorial teaches you how to change the background color of a table when you move the cursor over a table (cell.First, create a menu on your page. Then, create two colors for identification: The first is the initial color of the table, the other
The value of background-position can be the unit of length, percentage, or keyword.The length unit is easy to understand. The value is positive, and the value is negative. In the keyword, "left top" means "0% center" means "50% right bottom" means "1
Tip: you can modify some code before running Example:Happy Wolf smart rounded cornerHappy Wolf smart rounded corners:Class = "[4, 'Blue ',' # ffff']":In sequence: [rounded corner radius, color style, background (not necessary)]Class = "[1,
Tip: you can modify some code before running Multiple introductions: overflow: hidden; can realize automatic text hiding, but I can't get it all, it's all about automatic text wrapping.This is a test text. not recommended ~ · How long is the text ?~
Yii2 uses a more standard method to introduce js and css files through the AppAsset: register ($ this) method. In the Yii2 example, layouts main. php has its usage: AppAsset: register ($ this ).There is an assets directory in the WEB directory,
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