W3School-CSS 分类 (Classification) 实例_html/css_WEB-ITnose
CSS 分类 (Classification) 实例
CSS 实例
01如何把元素显示为内联元素和块级元素
01如何把元素显示为内联元素和块级元素 我这个段落被设置为内联元素。我这个段落被设置为内联元素。我这个段落被设置为内联元素。
哥俩好,我也是inline元素!哥俩好,我也是inline元素!哥俩好,我也是inline元素!
我不是p而是div,所以内容不会显示出来!我是一个段落随便写点啥我是一个段落随便写点啥我这个span元素被设置为块级元素。。块级元素。。!!我是一个段落随便写点啥我是一个段落随便写点啥一个段落随便写点啥我是一个段落随便写点啥我是一个段落随便写点啥我是一个段落随便写点啥所以我们两个span元素就换行了。。换行了。。!!我是一个段落随便写点啥我是一个段落随便写点啥我是一个段落随便写点啥
02浮动属性的简单应用
02浮动属性的简单应用 This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
03将带有边框和边界的图像浮动于段落的右侧
03将带有边框和边界的图像浮动于段落的右侧 This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
04带标题的图像浮动于右侧
04带标题的图像浮动于右侧
CSS is fun!This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
05使段落的首字母浮动于左侧
05使段落的首字母浮动于左侧 This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
在上面的段落中,文本的第一个字母包含在一个 span 元素中。这个 span 元素的宽度是当前字体尺寸的 0.7 倍。span 元素的字体尺寸是 400%,行高是 80%。span 中的字母字体是 "Algerian"
06创建水平菜单
06创建水平菜单
在上面的例子中,我们把 ul 元素和 a 元素浮向左浮动。li 元素显示为行内元素(元素前后没有换行)。这样就可以使列表排列成一行。ul 元素的宽度是 100%,列表中的每个超链接的宽度是 7em(当前字体尺寸的 7 倍)。我们添加了颜色和边框,以使其更漂亮。
07创建无表格的首页
07创建无表格的首页 浣溪沙·一曲新词酒一杯
听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?
浣溪沙·一曲新词酒一杯
一曲新词酒一杯,去年天气旧亭台。夕阳西下几时回?
无可奈何花落去,似曾相识燕归来。小园香径独徘徊。
08定位:相对定位
08定位:相对定位 我是位于正常位置的标题,相对定位会按照我的原始位置对我进行移动
样式 "left:-20px" 从我的左侧位置减去 20 像素
样式 "left:50px" 向我的左侧位置增加 50 像素
09定位:绝对定位
09定位:绝对定位 我是带有绝对定位的标题
通过绝对定位,元素可以放置到页面上的任何位置。下面的标题距离页面左侧 100px,距离页面顶部 150px。
10定位:固定定位
10定位:固定定位 一些文本。
更多的文本。
11如何使元素不可见
11如何使元素不可见 这是可见的标题
这是不可见的标题
12把表格元素设置为collapse
12把表格元素设置为 collapse
中国?? | 日本?? |
美国?? | 俄罗斯?? |
13改变光标
13改变光标 请把鼠标移动到单词上,可以看到鼠标指针发生变化:
Auto
Crosshair
Default
Pointer
Move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
14清除元素的侧面
14清除元素的侧面
CSS 分类 (Classification)总结
推荐阅读
-
ajax实现的点击数目加1代码实例_html/css_WEB-ITnose
-
照实例做,图片仍然无法跟随鼠标移动!请教_html/css_WEB-ITnose
-
实例讲解网站前台界面开发流程_html/css_WEB-ITnose
-
响应式布局及bootstrap(实例)_html/css_WEB-ITnose
-
div+css布局实例淘宝分析(三)(2)_html/css_WEB-ITnose
-
css实现的文本框focus获取焦点设置样式代码实例_html/css_WEB-ITnose
-
实例讲解网站前台界面开发流程_html/css_WEB-ITnose
-
div+css布局实例淘宝分析(一)_html/css_WEB-ITnose
-
CSS实现的鼠标滑过改变链接文字实例代码_html/css_WEB-ITnose
-
CSS实例练习_html/css_WEB-ITnose