gpt4 book ai didi

html - css中按钮的作用半径

转载 作者:行者123 更新时间:2023-11-28 11:07:07 25 4
gpt4 key购买 nike

看看有没有人能告诉我为什么我的 css 按钮的作用半径这么大,有什么办法可以减少它吗?当我将鼠标放在手上时,处于空闲状态的手远远超出了按钮的文本,我想减少这个 Action 区域,但不像在 css 中那样

谢谢。

CSS:

/*BOTONES SUPERIOR*/

#botonera-blogsuperior {
width: 900px;
height: 35px;
}
.texto-botones-blogsuperior {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
line-height: 10px;
color: #FFF;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 10px;
}

.menu-blogsuperior,
.menu-blogsuperior ul,
.menu-blogsuperior li,
.menu-blogsuperior a {
margin: 0;
padding: 0;
border: none;
outline: none;

}

.menu-blogsuperior {
height: 31px;
width: 900px;

}

.menu-blogsuperior li {
position: relative;
list-style: none;
float: right;
display: block;
height: 21px;

}

.menu-blogsuperior li a {
display: block;
padding: 0 0px;
padding-right: 15px;
margin: 25px -59px;
margin-right: 12px;
line-height: 22px;
text-decoration: none;
background-image: url (boton-fondo-probar.png);
background-repeat:no-repeat;
background-position:center;
height:27px;
width:105px;
background-position:46px -1px;
background-size:69px 24px;




font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;

color: #000000;

-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
text-align: right;
text-align: right;
text-align: right;
text-align: right;
}

.menu-blogsuperior li:first-child a { border-left: none; }
.menu-blogsuperior li:last-child a{ border-right: none; }

.menu-blogsuperior li:hover > a {
color: #FF6C6C;
}

.menu-blogsuperior ul {
position: absolute;
top: -109px;
left: 0;

opacity: 0;
background: #1f2024;

-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;

-webkit-transition: opacity .10s ease .1s;
-moz-transition: opacity .10s ease .1s;
-o-transition: opacity .10s ease .1s;
-ms-transition: opacity .10s ease .1s;
transition: opacity .10s ease .1s;
}

.menu-blogsuperior li:hover > ul { opacity: 1; }

.menu-blogsuperior ul li {
height: 0;
overflow: hidden;
padding: 0;


}

.menu-blogsuperior li:hover > ul li {
height: 36px;
overflow: visible;
padding: 0;
}

.menu-blogsuperior ul li a {
width: 36px;
padding: 10px 0 1px 10px;
margin: 0;

border: none;
border-bottom: 0px solid #353539;
}

.menu ul-blogsuperior li:last-child a { border: none; }

HTML

<div class="botonera-blogsuperior"><ul class="menu-blogsuperior">
<li><a href="/blog/indice">INDICE</a></li>
<li><a href="/blog/category/2/">DINO</a></li>
<li><a href="/blog/category/1/">LEONES</a></li>


</ul>
</div>

示例:

http://jsfiddle.net/#&togetherjs=vSgITe2BmT

谢谢!!

最佳答案

我只是将所有赋予链接形状的定义从 a 标记移动到 li 标记,并用边距替换了填充。

将此添加到您的 CSS:

.menu-blogsuperior li {
height:27px;
width:105px;
padding: 0 0px;
margin: 25px -59px;
margin-right: 27px;
background-image: url (boton-fondo-probar.png);
background-repeat:no-repeat;
background-position:center;
background-position:46px -1px;
background-size:69px 24px;
text-align: right;
text-align: right;
text-align: right;
text-align: right;
}

并在您的 CSS 中调整此定义,使其与我的完全一样:

.menu-blogsuperior li a {

text-decoration: none;

font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;

color: #000000;

-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;

}

在 fiddle 中为我工作。

关于html - css中按钮的作用半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22201440/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com