响应式布局中的折线

时间:2018-07-21 03:27:33

标签: html css css3 flexbox css-selectors

如何使“ div.header-title”本身居中(最大宽度为750px)。下面的每个H1,H2,H3应该是向左对齐的新行。

function is_enabled_jetpack_simple_payments() {
    /**
     * Can be used by plugin authors to disable the conflicting output of Simple Payments.
     *
     * @since 6.3.0
     *
     * @param bool True if Simple Payments should be disabled, false otherwise.
     */
    if ( apply_filters( 'jetpack_disable_simple_payments', false ) ) {
        return false;
    }
    // For WPCOM sites
    if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'has_blog_sticker' ) ) {
        $site_id = $this->get_blog_id();
        return has_blog_sticker( 'premium-plan', $site_id ) || has_blog_sticker( 'business-plan', $site_id );
    }
    // For all Jetpack sites
    return Jetpack::is_active() && Jetpack::active_plan_supports( 'simple-payments');
}
.header-title {
    display: flex;
    justify-content: center;
    align-items: center;
}

h2 {
display:block;
text-align:left;
}

1 个答案:

答案 0 :(得分:0)

在媒体查询中添加.header-title {flex-wrap: wrap;} & .header-title h1, .header-title h2 {width: 100%;}