ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: CSS :: CSS Àà±ð

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

CSS
CSS2 Aural
CSS µ¥Î»
CSS ÑÕÉ«
CSS ÑÕɫֵ
CSS ÑÕÉ«Ãû³Æ
CSS ±àÂëÓë×éÖ¯¼¼..
CSS Ä£¿é»¯Éè¼ÆË¼..
CSSÍêÃÀ¼æÈÝIE6/I..
CSS @ Ten: ÏÂÒ»¸..

CSS Àà±ð


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:9290 :: ::

The CSS classification properties allow you to specify how and where to display an element.
CSS·ÖÀàÊôÐÔÔÊÐíÄãÖ¸¶¨ÔªËØÔõÑùÏÔʾ²¢ÔÚÄÄÏÔʾ¡£


ʵÀý

How to display an element
This example demonstrates how to display an element.
ÔõÑùÏÔÊ¾Ò»ÔªËØ

A simple use of the float property
Let an image float to the right in a paragraph.
Ò»¸ö¼òµ¥µÄ¸¡¶¯ÊôÐÔ

An image with border and margins that floats to the right in a paragraph
Let an image float to the right in a paragraph. Add border and margins to the image.
Ò»¸ö´ø±ß¿òºÍ±ß¾àµÄͼƬ¸¡¶¯µ½Ò»¸ö¶ÎÂäµÄÓÒ±ß

An image with a caption that floats to the right
Let an image with a caption float to the right.
´øËµÃ÷µÄͼƬ¸¡¶¯µ½ÓÒ±ß

Let the first letter of a paragraph float to the left
Let the first letter of a paragraph float to the left and style the letter.
ÈÃÒ»¶ÎÂäµÄµÚÒ»¸ö×Ö·û¸¡¶¯µ½×ó±ß

Creating a horizontal menu
Use float with a list of hyperlinks to create a horizontal menu.
½¨Á¢Ò»Ë®Æ½²Ëµ¥

Creating a homepage without tables
Use float to create a homepage with a header, footer, left content and main content.
ʹÓÃfloatÀ´½¨Á¢Ò»¸ö´øÓбêÌ⣬½Å±ê£¬×óÄÚÈݺÍÖ÷ÄÚÈݵÄÊ×Ò³

Position:relative
This example demonstrates how to position an element relative to its normal position.
ÑùʽÈÃÔªËØÏà¶ÔÓÚËüµÄԭʼλÖÃÀ´½øÐÐÏà¶Ô¶¨Î»

Position:absolute
This example demonstrates how to position an element using an absolute value.
ÈçºÎʹÓþø¶ÔÖµÀ´¶¨Î»Ò»¸öÔªËØ

How to make an element invisible
This example demonstrates how to make an element invisible. Do you want the element to show or not?
ÔõÑùÊ¹Ò»ÔªËØ²»¿É¼û¡£

Change the cursor
This example demonstrates how to change the cursor.
ÈçºÎ¸Ä±äÓαêµÄÑù×Ó


CSS Classification Properties
CSSÀà±ðÊôÐÔ

The CSS classification properties allow you to control how to display an element, set where an image will appear in another element, position an element relative to its normal position, position an element using an absolute value, and how to control the visibility of an element.
CSSÀà±ðÊôÐÔÔÊÐíÄã¿ØÖÆÔªËØµÄÏÔʾЧ¹û£¬ÉèÖÃͼÏó½«ÔÚÏÔʾÔÚÁíÒ»ÔªËØµÄÄĸöλÖã¬Ïà¶ÔÓÚÔªËØÕý³£Î»ÖõĶ¨Î»£¬ÒÔ¾ø¶ÔÖµÀ´¶¨Î»Ò»ÔªËØ£¬²¢¿ØÖÆÔªËصĿɼûÐÔ¡£

Browser support: IE: Internet Explorer, F: Firefox, N: Netscape.
ä¯ÀÀÆ÷Ö§³Ö£ºIE: Internet Explorer, F: Firefox, N: Netscape.

W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).
W3C£ºÀïÃæµÄÊý×Ö´ú±íCSS°æ±¾ºÅ

ÊôÐÔ ÃèÊö Öµ IE F N W3C
clear Sets the sides of an element where other floating elements are not allowed
ÉèÖÃÒ»ÔªËØµÄÁ½±ß¶¼²»ÔÊÐíÓÐÆäËûÔªËØ½øÐи¡¶¯
left
right
both
none
4 1 4 1
cursor Specifies the type of cursor to be displayed
Ö¸¶¨ÓαêËùÏÔʾµÄÀàÐÍ
url
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
4 1 6 2
display Sets how/if an element is displayed
ÉèÖÃÔªËØ(ÊÇ·ñ/ÔõÑù)ÏÔʾ
none
inline
block
list-item
run-in
compact
marker
table
inline-table
table-row-group
table-header-group
table-footer-group
table-row
table-column-group
table-column
table-cell
table-caption
4 1 4 1
float Sets where an image or a text will appear in another element
ÉèÖÃÔÚÁíÒ»ÔªËØÀïµÄͼƬ»òÊÇÎÄ×Ö½«ÔÚÄĸöλÖÃÏÔʾ
left
right
none
4 1 4 1
position Places an element in a static, relative, absolute or fixed position
½«ÔªËØÒÔstatic, relative, absolute»òÊǹ̶¨µÄ·½Ê½½øÐж¨Î»
static
relative
absolute
fixed
4 1 4 2
visibility Sets if an element should be visible or invisible
ÉèÖÃÔªËØÏÔʾ»òÊDz»ÏÔʾ
visible
hidden
collapse
4 1 6 2

ÆÀÂÛ (1) 1 All