gpt4 book ai didi

html - 将文本放入 div 中心的问题

转载 作者:太空宇宙 更新时间:2023-11-03 21:40:18 25 4
gpt4 key购买 nike

我制作了一些按钮将人们从我的网站链接到社交媒体页面,Google Plus 中的文本太低了,我希望它在 div 中更高,但我很难做到这一点,我的代码在 JS fiddle 上.

按钮还没有完成,我只是想知道如何让文字变高,干杯

.GooglePlus {
color: black;
font-size: 35px;
border-radius: 100px;
padding: 2px;
font-family: Garamond;
font-weight: bold;
height: 40px;
width: 40px;
background-color: #D8D8D8;
text-align: center;
vertical-align: central;
}
a:hover .GooglePlus {
background-color: #FE2E2E;
color: white;
}

最佳答案

只需添加line-height:27px;来调整g+

代码全类:

.GooglePlus {
color: black;
font-size: 35px;
border-radius: 100px;
padding: 2px;
font-family: Garamond;
font-weight: bold;
height: 40px;
width: 40px;
background-color: #D8D8D8;
text-align: center;
vertical-align: middle;
line-height:27px;
}

关于html - 将文本放入 div 中心的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24063360/

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