提问者:小点点

将h1文本对齐到框的底部


如何将h1框内的文本对齐到它的底部。

<h1 class="woocommerce-products-header__title page-title">All</h1>

以下是当前的CSS:

    h1.woocommerce-products-header__title, h1.entry-title {
        font-family: 'Noe Display Bold', Times, serif;
        text-transform: uppercase;
        font-size: 24px;
        letter-spacing: 3px;
        border-bottom: 1px solid #000;
        padding-bottom: 7px;
        line-height: 1;
    }
    h1.entry-title {
        text-transform: none;
    }

我正在Ubuntu上使用Chrome版本81.0.4044.92进行检查。


共1个答案

匿名用户

看起来你看到了线的高度。 因此您的修复可能是:line-height:1。 但是,当你的H1将包装长文本,这将导致无法阅读的文本。

(我假设你检查了底部填充物)