给超链接A添加按钮样式
2011-04-13 10:03
211 查看
在进行界面设计过程中,需要给超链接A添加按钮样式,原本以为是利用height和width分别控制高度和宽度,然后利用background来设置背景图片就可以了。没想到在实际测试过程中,根本不行。于是就只好利用padding方法进行微调,最终得到理想效果,css代码如下:
.Pager
{
margin:10px;
text-align:right;
font-weight:bold;
}
.Pager a
{
color:Red;
padding-top:5px;
padding-bottom:9px;
padding-left:20px;
padding-right:20px;
background:url(images/loginButton.gif) no-repeat;
}
.Pager a:hover
{
color:Blue;
text-decoration:none;
}
.Pager a:visited
{
text-decoration:none;
font-size:12px;
color:Red;
}
最终得到的效果如下:
参照一楼给的建议,我修改代码如下:
.Pager a
{
color:Red;
<%-- padding-top:5px;
padding-bottom:9px;
padding-left:20px;
padding-right:20px;--%>
width:77px;
height:27px;
display:block;
text-align:center;
line-height:27px;
float:left;
background:url(images/loginButton.gif) no-repeat;
}
谢谢@倾斜的水瓶座提醒。
pS:博客园编辑好垃圾,这篇文章编写过程中,浏览器死了两次,晕啊 。。。。。不是一般的不给力。
.Pager
{
margin:10px;
text-align:right;
font-weight:bold;
}
.Pager a
{
color:Red;
padding-top:5px;
padding-bottom:9px;
padding-left:20px;
padding-right:20px;
background:url(images/loginButton.gif) no-repeat;
}
.Pager a:hover
{
color:Blue;
text-decoration:none;
}
.Pager a:visited
{
text-decoration:none;
font-size:12px;
color:Red;
}
最终得到的效果如下:
参照一楼给的建议,我修改代码如下:
.Pager a
{
color:Red;
<%-- padding-top:5px;
padding-bottom:9px;
padding-left:20px;
padding-right:20px;--%>
width:77px;
height:27px;
display:block;
text-align:center;
line-height:27px;
float:left;
background:url(images/loginButton.gif) no-repeat;
}
谢谢@倾斜的水瓶座提醒。
pS:博客园编辑好垃圾,这篇文章编写过程中,浏览器死了两次,晕啊 。。。。。不是一般的不给力。
相关文章推荐
- 给超链接A添加按钮样式
- wpf 如何对window样式中的close按钮添加关闭事件
- repeater实现样式设置,并添加删除按钮,参考课上老师做的案例。数据表添加字段status,使用repeater实现禁用与启用。repeater添加编辑按钮,和Edit.aspx页面。
- 创建一个flash as3.0按钮并添加超链接
- CSS 将按钮转成超链接样式
- 隔行变色,选中变色,鼠标变小手样式;姓名查询条件 过滤敏感字符 下拉列表排序 非空验证添加信息 点击按钮删除
- jqgrid表格列选项edittype为text、checkbox、select、textarea、function、超链接,添加自定义按钮
- html中input按钮怎么添加超链接
- HTML篇之CSS样式:<button></button>按钮变成超链接<a></a>的样式
- CI 中为view添加一个带超链接的按钮
- jquery添加的html元素按钮为什么不执行类样式绑定的click事件
- html5之按钮点击添加样式
- UINavgationController的背景色,任意按钮添加,更改样式等
- ionic在文本标头添加按钮样式
- 给按钮添加超链接
- HTML篇之CSS样式:<button></button>按钮变成超链接<a></a>的样式
- Extjs grid添加图片,按钮和超链接
- 02---按钮的设置 控制器拥有导航栏包装一层导航控制器 添加子控制器 UIBarButtonItem导航按钮 设置导航栏UINavigationBar主题 设置状态栏样式
- jqgrid表格列选项edittype为text、checkbox、select、textarea、function、超链接,添加自定义按钮
- 如何为按钮或者图片控件添加超链接?