当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS 类别

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS 类别


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 773 ::
收藏到网摘: n/a

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
设置元素显示或是不显示
visible
hidden
collapse
4 1 6 2

评论 (0) All

登陆 | 还没注册?