如何制作一个漂亮的 css 按钮

html-css010

如何制作一个漂亮的 css 按钮,第1张

启动dreamweaver,点击“站点”---“新建站点”

2

在弹出的窗口中,站点名称为“漂亮按钮”,本地站点文件夹可以根据需要选择。点击“保存”按钮,站点创建成功。

END

二、创建css文件

1

点击“文件”----“新建”,在弹出的窗体中选择“空白页”-----“CSS”,然后点击“创建”按钮。

2

点击“文件”----“保存”,在文件名中输入“style”,然后点击“保存”,样式表文件创建成功。

END

三、创建html页面

1

点击“文件”----“新建”,在弹出的窗体中选择“空白页”-----“HTML”---“无”。

2

在附加CSS文件中,选择style.css样式表文件,点击“确定”。

3

点击“创建”按钮,生成HTML文件。点击“文件”----“保存”按钮,文件名设置为“index”,最后点击保存即可。

END

三、在html页面中添加一个按钮控件

1

在“插入”-----“表单”中,点击“按钮”

2

在弹出的对话框中,什么也不需要修改,直接点击“确定”。

3

在弹出窗口中,选择“是“

4

按钮添加成功,效果如下。

END

四、新建CSS规则

1

在CSS样式表中,选择“新建CSS规则“

2

在弹出的窗口中选择”类(可应用于任何HTML元素)“,选择器名称设置为“btnstyle”,然后点击“确定”。

3

然后,在找到按钮控件,将它的类设置为”btnstyle”

END

五、用CSS规则修改按钮控件的外观

1

.btnstyle {

width: 86px/*按钮控件的宽度*/

text-align: center/*按钮控件中文本居中显示*/

line-height: 100%/*用百分比设置行高*/

padding-top: 0.5em/*文本顶部的内边距*/

padding-right: 2em/*文本右侧的内边距*/

padding-bottom: 0.55em/*文本底部的内边距*/

padding-left: 2em/*文本左侧的内边距*/

font-family: "Arial Black", Gadget, sans-serif/*字体*/

font-size: 14px/*字体大小*/

font-style: normal/*字体样式*/

font-variant: normal/*小写字母*/

font-weight: normal/*文本不需要加粗*/

text-decoration: none/*文本不需要下划线等*/

margin-top: 0px/*外边框的距离*/

margin-right: 2px/*外边框的距离*/

margin-bottom: 0px/*外边框的距离*/

margin-left: 2px/*外边框的距离*/

vertical-align: text-bottom/*图像放在文本下面*/

display: inline-block/*段落内生出内框*/

cursor: pointer/*鼠标的形状*/

zoom:1

outline-width:medium/*整个轮廓的宽度*/

outline-color:inherit/*轮廓的颜色*/

font-size-adjust:none

font-stretch:normalhttp://v.youku.com/v_show/id_XMTMzMTM0ODIzMg==.html

border-top-left-radius:0.5em/*圆角边框弧度*/

border-top-right-radius:0.5em/*圆角边框弧度*/

border-bottom-left-radius:0.5em/*圆角边框弧度*/

border-bottom-right-radius:0.5em/*圆角边框弧度*/

box-shadow:0px 1px 2px rgba(0,0,0,0.2)/*给按钮增加阴影*/

color:#fefee9/*设置文本的颜色*/

border-top-color:#da7c0c/*边框的颜色*/

border-right-color:#da7c0c/*边框的颜色*/

border-bottom-color:#da7c0c/*边框的颜色*/

border-left-color:#da7c0c/*边框的颜色*/

border-top-width:1px/*边框的粗细*/

border-right-width:1px/*边框的粗细*/

border-bottom-width:1px/*边框的粗细*/

border-left-width:1px/*边框的粗细*/

border-top-style:solid/*边框的样式*/

border-right-style:solid/*边框的样式*/

border-bottom-style:solid/*边框的样式*/

border-left-style:solid/*边框的样式*/

background-image:none/*背景图片*/

background-attachment:scroll/*背景图片是否移动*/

background-repeat:repeat/*允许重复*/

background-position-x:0%/*背景的x轴坐标*/

background-position-y:0%/*背景的y轴坐标*/

background-size:auto/*背景图片的尺寸*/

background-origin:padding-box/*背景图像相对于内边距框来定位*/

background-clip:padding-box/*背景被裁剪到内边距框*/

background-color:#f78d1d/*背景颜色*/

}更多学习5 1 r g b

2

再写一句mybtn的hover样式。代码如下:

.btnstyle:hover {

background-color: #f47c20

}

http://hi.baidu.com/tchzx/blog/item/c8a3d613131cae025baf53b0.html

跟我一起玩百度空间CSS教程+090+ (从"零"开始学玩百度空间)

http://hi.baidu.com/tchzx/blog/item/c8a3d613131cae025baf53b0.html

谭诚工作室: http://hi.baidu.com/tchzx

1.让你看懂css各个参数http://hi.baidu.com/tchzx/blog/item/1e0453e7c351052eb838200d.html

2.百度空间CSS使用说明http://hi.baidu.com/tchzx/blog/item/b360d33fddd2b0c27c1e714a.html

3.怎样编写CSS的! http://hi.baidu.com/tchzx/blog/item/d75fd7a2f36821adcaefd0e1.html

4.CSS代码解密http://hi.baidu.com/tchzx/blog/item/f106f71f339b06f5e1fe0bfe.html

5.一个CSS的漏洞http://hi.baidu.com/tchzx/blog/item/c1e74cfb9c6c8164024f560d.html

6.增加自定义模块功能http://hi.baidu.com/tchzx/blog/item/c207c91b9f69d7faae513303.html

7.更换主体及文章的背景http://hi.baidu.com/tchzx/blog/item/f7b0d609ad57ba82d0581b15.html

8.透明flash代码http://hi.baidu.com/tchzx/blog/item/5012e1cd15168a510eb345e3.html

9.百度空间十大宝藏http://hi.baidu.com/tchzx/blog/item/7e3daa6eb9da40da80cb4a62.html

10.制作个性化的标题栏http://hi.baidu.com/tchzx/blog/item/ae077109a6518aaf2fddd434.html

11.看到更多的百度空间http://hi.baidu.com/tchzx/blog/item/dbe16c634f5e47600d33fa07.html

12.百度空间的8个优缺点http://hi.baidu.com/tchzx/blog/item/75d054432e8b9e119213c606.html

13.专栏分割线的代码修改http://hi.baidu.com/tchzx/blog/item/32c416df0880ac1362279831.html

14.添加自己的LOGO图片http://hi.baidu.com/tchzx/blog/item/0bee1a9599002e087af48000.html

15.宣传百度空间的方法http://hi.baidu.com/tchzx/blog/item/a8f9758b7e459512c9fc7a59.html

16.添加多首背景音乐http://hi.baidu.com/tchzx/blog/item/5339282e42b2bd504ec22617.html

17.设置透明背景图http://hi.baidu.com/tchzx/blog/item/f4cb90dd7fad81345882ddb6.html

18.更改空间的鼠标样式http://hi.baidu.com/tchzx/blog/item/50c2c15cc3d17f43faf2c0b6.html

19.在空间里加入滚动条http://hi.baidu.com/tchzx/blog/item/702631d319d09a003bf3cfb6.html

20.透明的背景音乐的播放器http://hi.baidu.com/tchzx/blog/item/97f7b909d38ada246a60fbb6.html

21.透明个性化滚动条http://hi.baidu.com/tchzx/blog/item/3013b5fbeaff41224e4aeab6.html

22.给链接添加背景色效果代码http://hi.baidu.com/tchzx/blog/item/effb6427fc39db03908f9db6.html

23.显示"点击给你发消息"怎么在空间做! http://hi.baidu.com/tchzx/blog/item/62e02f3893d9c524b9998fb6.html

24.去掉文章题目下划线http://hi.baidu.com/tchzx/blog/item/ce8c044f1019db36aec3abb6.html

25.常用插入图片位置的代码http://hi.baidu.com/tchzx/blog/item/83257c89c9b823b30e2444b5.html

26.如何隐藏播放器而不影响音乐播放http://hi.baidu.com/tchzx/blog/item/e4233edbfb147e66d1164eb5.html

27.如何有字体阴影http://hi.baidu.com/tchzx/blog/item/b1d78094e72b511ed31b70b5.html

28.自制闪字空间名称http://hi.baidu.com/tchzx/blog/item/df49ca114a626b10b8127bb5.html

29.解决回车换两行的问题http://hi.baidu.com/tchzx/blog/item/b420a086e4fe533e66096eb5.html

30.调整一下行距http://hi.baidu.com/tchzx/blog/item/b8bc514e84b1fd09b2de05b5.html

31.让空间拥有精美flash背景http://hi.baidu.com/tchzx/blog/item/5fc12af5ea17b525bd3109b5.html

32.让空间自动弹出对话框!http://hi.baidu.com/tchzx/blog/item/5339282e4cd0b7504ec226b5.html

33.修改blog显示的文字颜色大小http://hi.baidu.com/tchzx/blog/item/691c36ad2e075a094a36d6b5.html

34.如何让你的浏览器滚动条变色http://hi.baidu.com/tchzx/blog/item/af686238d73fbd2396ddd8b5.html

35.为评论和链接加上图片http://hi.baidu.com/tchzx/blog/item/b2c26759e6c5f82a2934f0b5.html

36.如何在"其它"下面加上图片http://hi.baidu.com/tchzx/blog/item/6c1f975228ca5e0e0df3e3b5.html

37.百度空间的名称如何用艺术字?http://hi.baidu.com/tchzx/blog/item/0738f00331678cec09fa93b5.html

38.百度空间文字发光的方法http://hi.baidu.com/tchzx/blog/item/d5b9ff19f8f01a7adbb4bdb5.html

39.文字快速插链接http://hi.baidu.com/tchzx/blog/item/ca2b7e3166bd9f19eac4afb5.html

40.空间模块巧移动http://hi.baidu.com/tchzx/blog/item/b4abaa4b8efb5ff083025cb4.html

41.个性化你的IP显示,自定义颜色http://hi.baidu.com/tchzx/blog/item/378ed71659cc8718962b43b4.html

42.全透明http://hi.baidu.com/tchzx/blog/item/c12a7a1e97f322f41ad576b4.html

43.空间背景半透明http://hi.baidu.com/tchzx/blog/item/b4e8bda1faf95e8b461064b4.html

44.如何在百度空间的文章标题周围加花边图案?http://hi.baidu.com/tchzx/blog/item/55a6221fbf22fdc8a68669b4.html

45.关于百度空间照片大小限制的问题!!! http://hi.baidu.com/tchzx/blog/item/f7b0d609ab36b082d0581bb4.html

46.如何在百度空间发表文章时插入FLESH动画?http://hi.baidu.com/tchzx/blog/item/f106f71f32c101f5e1fe0bb4.html

47.怎样换百度空间的背景http://hi.baidu.com/tchzx/blog/item/c94729dd492b50d98c1029b4.html

48.做分割线的方法http://hi.baidu.com/tchzx/blog/item/f6fbb77e136749380dd7dab4.html

49.在百度空间里面添加自己的特效http://hi.baidu.com/tchzx/blog/item/69db8044561f364c500ffeb4.html

50.在文章中快速插入图片http://hi.baidu.com/tchzx/blog/item/437f5eee9b8a79fbb3fb95b4.html

51.添加计数器的两种方法http://hi.baidu.com/tchzx/blog/item/0731f5d3cecb3ddfa8ec9ab4.html

52.如何在空间顶部加入图片http://hi.baidu.com/tchzx/blog/item/4b9b8cd437fbab01a08bb7b4.html

53.发表评论框的图片http://hi.baidu.com/tchzx/blog/item/b4abaa4b8ef45ff083025cab.html

54.改变空间主页名称和简介的字体大小http://hi.baidu.com/tchzx/blog/item/7e3daa6e94237dda80cb4aab.html

55.给超链接添加按钮效果http://hi.baidu.com/tchzx/blog/item/95f73d292412ccfe98250aab.html

56.如何给评论框添加背景http://hi.baidu.com/tchzx/blog/item/c26ece17518b4b09c83d6df9.html

57.Iframe 用法的详细讲解http://hi.baidu.com/tchzx/blog/item/e23e207f172e2b0828388a8e.html

58.背景图片素材01 http://hi.baidu.com/tchzx/blog/item/bc11d02aa2db092dd52af10f.html

59.图片素材20060929 http://hi.baidu.com/tchzx/blog/item/6d12563d821675ee3c6d970e.html

60.我的自定义设计 http://hi.baidu.com/tchzx/blog/item/3c6ab5b731ac21f431add193.html

61.CSS鼠标样式大全 http://www.hi128.cn/?250/action_viewspace_itemid_37.html

62.跟我一起玩百度空间的音乐和视频+ http://hi.baidu.com/tchzx/blog/item/398833a85082a0b1ca130c21.html

63.为<好友列表>增加一个滚动条 http://hi.baidu.com/tchzx/blog/item/b54a0bf4d32be5ef7709d70b.html

64.空间模块巧移动 + 文字快速插链接 http://hi.baidu.com/tchzx/blog/item/d6369b82c9d0e2bf6d811914.html

65.怎么去掉百度空间里模块的框框!http://hi.baidu.com/tchzx/blog/item/5012e1cd2f64b0510eb345b1.html

66.基本颜色代码+ http://hi.baidu.com/tchzx/blog/item/e3f0317aa7d065ed2f73b329.html

67.在你的空间中加入幽默元素.. http://hi.baidu.com/tchzx/blog/item/5612858b86b287d3fc1f10f0.html

68.百度空间吧[精品]贴+ http://hi.baidu.com/tchzx/blog/item/06cf65d06bb7be8fa1ec9cf9.html

69.如何在博客上---中--下加入图片(时钟)http://hi.baidu.com/tchzx/blog/item/8e2cb0452fc7b226cefca333.html

72.教你10个你未必知道的CSS技巧! http://hi.baidu.com/tchzx/blog/item/ee3cb41c0680918b86d6b60e.html

73.用CSS进行百度空间样式设计! http://hi.baidu.com/tchzx/blog/item/f7b0d609a75eac82d0581b0c.html

74.百度空间自动友情链接 http://hi.baidu.com/tchzx/blog/item/f235a64477276882b2b7dc98.html

75.一起玩百度空间帮助 http://hi.baidu.com/tchzx/blog/item/e4233edbfee96366d0164e98.html

76.一起玩百度空间榜单 http://hi.baidu.com/tchzx/blog/item/5173043b98a1f8ea15cecb99.html

77.点对点宣传百度空间 http://hi.baidu.com/tchzx/blog/item/e859cc13444c3823dc540164.html

78.百度空间常见27+问题 http://hi.baidu.com/tchzx/blog/item/9636b38f8c02a5eef11f365a.html

79.怎样让百度、Google搜到你的博客 http://hi.baidu.com/tchzx/blog/item/3c6ab5b70df03df430add15f.html

80.如何加上一个个性时间网页上?http://hi.baidu.com/tchzx/blog/item/f467a7ec9522603d279791a5.html

81.教你怎样让背景自动更新,包括头背景 http://hi.baidu.com/tchzx/blog/item/92eb968f3bd93afa503d927a.html

82.在 CSS 中关于字体处理效果的思考 http://hi.baidu.com/tchzx/blog/item/4ac6be3876097ac2d4622526.html

83.如何置顶文章及美化自定意模块! http://hi.baidu.com/tchzx/blog/item/6c1f97523edf440e0df3e382.html

84.如何美化页眉部分 http://hi.baidu.com/tchzx/blog/item/d6f1ecc4d2bb75a98326ac83.html

85.更换背景及滚动轴颜色和空间半透代码 http://hi.baidu.com/tchzx/blog/item/4dd018306adb8e99a8018e8c.html

86.如何设置标题.简介及文章字体为光晕字 http://hi.baidu.com/tchzx/blog/item/55a6221f8acae6c8a786698c.html

87.用CSS来控制网页背景 http://hi.baidu.com/tchzx/blog/item/cce94b08ec6526950b7b8228.html

88.CSS产生的特殊效果 http://hi.baidu.com/tchzx/blog/item/e763a11ebdb7c61f40341728.html

89.用Css控制IE5.5浏览器中滚动条 http://hi.baidu.com/tchzx/blog/item/4dd0183097408399a8018e29.html

90.css语法(百度空间) http://hi.baidu.com/tchzx/blog/item/e5e21ed8ac5b8a3532fa1c29.html

参考资料:http://hi.baidu.com/tchzx/blog/item/c8a3d613131cae025baf53b0.html