css Beaver Builder为全宽,从Genesis的首页开始
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css Beaver Builder为全宽,从Genesis的首页开始相关的知识,希望对你有一定的参考价值。
<?php
// Template Name: Full Width Page
add_filter( 'body_class', 'beaver_body_class' );
/**
* Adds a css class to the body element
*
* @param array $classes the current body classes
* @return array $classes modified classes
*/
function beaver_body_class( $classes ) {
$classes[] = 'fl-builder-full';
return $classes;
}
/**
* Add attributes for site-inner element, since we're removing 'content'.
*
* @param array $attributes Existing attributes.
* @return array Amended attributes.
*/
function be_site_inner_attr( $attributes ) {
// Add the attributes from .entry, since this replaces the main entry
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
return $attributes;
}
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
// Display Header
get_header();
// Display Content
the_post(); // sets the 'in the loop' property to true.
the_content();
// Display Comments
genesis_get_comments_template();
// Display Footer
get_footer();
/* Full Width Pages
-------------------------------------------- */
.fl-builder-full .site-header {
background-color: transparent;
}
.fl-builder-full .site-header.dark {
background-color: #000;
}
.fl-builder-full .site-inner {
max-width: none;
margin-top: 0;
}
@media only screen and (max-width: 1023px) {
.fl-builder-full .site-header {
background-color: #000;
}
}
以上是关于css Beaver Builder为全宽,从Genesis的首页开始的主要内容,如果未能解决你的问题,请参考以下文章
css 强制GP进入全宽,隐藏页眉和标题并强制布局到没有侧边栏,Beaver Builder在页面上处于活动状态。
css Beaver Builder CSS片段
css 使Beaver Builder标注对齐
css 使Beaver Builder CTA对齐
css Beaver Builder的字体很棒
css 回到Beaver Builder的顶部