Homemade page Small Note

Source: Internet
Author: User

Just beginning to write HTML really doesn't fit, more difficult than imagined. This time, although the Web site is very simple, but can certainly write the desired effect, and already familiar with the routines. Some usage is documented below.

Css:

Import CSS

<link rel= "stylesheet" type= "Text/css" href= "E:\pyFiles\html\console\window.css" >

Get cursor

Someelement:hover

Add content after a label

someelement:after{

Content

}

Border Shadow

box-shadow:0 2px 8px 2px rgba (0,0,0,0.12);

Bold body

Font-weight:bold

Remove points from the Ul.li

List-style:none

Font: Microsoft ya Black

font-family: ' Microsoft yahei ', ' Simhei '

Min. Height:

Min-height

Not visible

Visibility:hidden

Merge borders, set a single border

Border-collapse:collapse;

To set a background image:

Background:url (.. /images/....png) No-repeat;

No-repeat: Not populated

Repeat-x: Transverse fill

Repeat-y: Longitudinal fill

Clear both ends float to prevent the parent class from drifting away

<div style= "Clear:both;" ></div>

Set row height

Line-height:

Spacing of adjacent cell borders

border-spacing:0;

  

scroll bar

Overflow:auto

Overflow:clear more than rolling clear

Transparency

Opacity:0.5:chrome Transparency from 0-1

div layer: Z-index bigger, more on top

Location: Position

Fixed fix in browser window Left,top etc to locate

Relative relative position

Absolute absolute position, relative to the location of the browser. The relative position after the relative. Sometimes the position of a relative div under a div is also

Jquery:

Core: Find elements, manipulate elements

  

After the framework is loaded, execute the function:

$ (document). Ready (function () {}); All the other functions are applied in this case.

Import jquery

<script src= ". /js/jquery-1.8.2.min.js "></script>

  

Get the value of the object:

Someelement.val ();

  

Hide/Show Tags:

Someelement.hide ();

Someelement.show ();

Someelement.toggle (); Toggle Hide and Show

Get familiar with the elements:

Someelement.attr ("..");

To set the attributes of an element:

Someelement.attr ("name", "LIQX");

  

Determines whether an element is hidden

if (someelement). Is (": hidden")) {};

if (someelement). Is (": visible")) {};

Add or remove a style for an object

Someelement.addclass (). Removeclass ();

Jump to a page

location.href= ' some.html ';

  

  

Homemade page Small Note

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.