最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creating CSS Buttons (二)
时间:2022-06-30 09:43:47 编辑:袖梨 来源:一聚教程网
A CSS Button Creation Class
Introduction
In an earlier article, Creating CSS Buttons, I examined how to create graphical-appearing buttons using nothing but HTML and CSS. While this approach is fairly simple to implement - just add a few style tags and a suitable HREF and DIV tag - it is a bit mundane to have to do for each and every button, especially since you need to have a unique set of style classes and IDs for each unique button. (If you are thoroughly confused by this point, be sure you've read the Creating CSS Buttons article before delving into this one...) In this article we will examine a small, but handy class to help automate the process of creating CSS buttons. Furthermore, when using a class we'll be creating and placing buttons much like you would in a VB project. (For more information on creating and using classes in VBScript, be sure to read Mark Lidstone's excellent article: Using Classes within VBScript!)
Determining the Class Properties
The first step in creating our CSS button creating class is to decide what properties makeup a CSS button. While there is literally no limit to the number of properties one could conceivably attribute to a button, for this article I am going to assume that this set of properties conveys the basic features one would like to have in a button:
CssButton Class Properties
Name Uniquely identifies each button.
BackColor Specifies the background color of the button.
BorderColor Specifies the color of the button's border.
Font The font to use for the button's label. Must be in the format: style size font-name, such as: bold 12pt arial.
FontColor The color of the font when the button is not selected.
Width The width of the button.
Text The text to display on the button.
Url The Url to take the user to when the click the button.
MouseOverColor The color to make the font when the user's mouse moves over the button.
This will only work for visitors using IE...
Introduction
In an earlier article, Creating CSS Buttons, I examined how to create graphical-appearing buttons using nothing but HTML and CSS. While this approach is fairly simple to implement - just add a few style tags and a suitable HREF and DIV tag - it is a bit mundane to have to do for each and every button, especially since you need to have a unique set of style classes and IDs for each unique button. (If you are thoroughly confused by this point, be sure you've read the Creating CSS Buttons article before delving into this one...) In this article we will examine a small, but handy class to help automate the process of creating CSS buttons. Furthermore, when using a class we'll be creating and placing buttons much like you would in a VB project. (For more information on creating and using classes in VBScript, be sure to read Mark Lidstone's excellent article: Using Classes within VBScript!)
Determining the Class Properties
The first step in creating our CSS button creating class is to decide what properties makeup a CSS button. While there is literally no limit to the number of properties one could conceivably attribute to a button, for this article I am going to assume that this set of properties conveys the basic features one would like to have in a button:
CssButton Class Properties
Name Uniquely identifies each button.
BackColor Specifies the background color of the button.
BorderColor Specifies the color of the button's border.
Font The font to use for the button's label. Must be in the format: style size font-name, such as: bold 12pt arial.
FontColor The color of the font when the button is not selected.
Width The width of the button.
Text The text to display on the button.
Url The Url to take the user to when the click the button.
MouseOverColor The color to make the font when the user's mouse moves over the button.
This will only work for visitors using IE...
相关文章
- 豚豚剧官网在线观看入口链接分享-豚豚剧2026最新资源在线看 01-19
- twitch官网入口地址-twitch网页版登录 01-19
- 追剧网官网高清免费在线观看-最新电视剧电影免下载 01-19
- 1688成品网站入口-网页版一键登录1688 01-19
- 360网页版一键登录-360安全浏览器极速网页版 01-19
- 126邮箱登录入口升级版-126免费邮箱网页版直达热榜首选 01-19