给超链接A添加按钮样式

在进行界面设计过程中,需要给超链接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:博客园编辑好垃圾,这篇文章编写过程中,浏览器死了两次,晕啊 。。。。。不是一般的不给力。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值