gpt4 book ai didi

html - CSS - 如何在此页面上正确对齐星号

转载 作者:行者123 更新时间:2023-11-27 22:32:06 30 4
gpt4 key购买 nike

我在使用 IE 9 和 Opera 浏览器时遇到问题,只是为了对齐星号。

我正在使用以下 HTML:

<div class="fullwidth">
<div class="floatleft star">&#9733;</div>
<h3 class="icontxt">Co-Hosts</h3>
</div>

以下 CSS:

.floatleft
{
float: left;
}

.fullwidth
{
width: 100%;
}

h3
{
margin: 0;
text-align: left;
font-family: "GearedSlab-Regular", "Geared Slab Regular", "geared_slabregular";
text-transform: uppercase;
color: #212D3B;
letter-spacing: .1em;
font-size: 1.5em;
line-height: 1.7em;
}

h3.icontxt
{
padding-left: 1.5em;
}

.star
{
font-size: 1.4em !important;
color: #A92A23;
}

好的,Chrome、Firefox 和 Safari 会像这样呈现它(这是我在所有浏览器中都需要的方式):

This looks exactly the way I need it to look

但是,如果您在 IE 9 和/或 Opera 中查看它,它看起来像这样:

The Star is too high

Star太高了,需要和文字相符:“CO-HOSTS”

我是不是做错了什么?如何在 IE、Chrome、Opera、Safari 和 Firefox 上通用?这真是太令人沮丧了!

最佳答案

How about this :

.floatleft
{
float: left;
}

.fullwidth
{
width: 100%;
}

h3
{
margin: 0;
text-align: left;
font-family: "GearedSlab-Regular", "Geared Slab Regular", "geared_slabregular";
text-transform: uppercase;
color: #212D3B;
letter-spacing: .1em;
font-size: 1.5em;
line-height: 1.7em;
}

h3.icontxt
{
padding-left: 1.5em;
}

.star
{
line-height: 1.7em;
font-size: 1.4em !important;
color: #A92A23;
}

关于html - CSS - 如何在此页面上正确对齐星号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16972862/

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