logo

额外区块类型 (EBT) - 全新的布局构建器体验❗

额外区块类型 (EBT) - 样式化、可定制的区块类型:幻灯片、标签页、卡片、手风琴等更多类型。内置背景、DOM Box、JavaScript 插件的设置。立即体验布局构建的未来。

演示 EBT 模块 下载 EBT 模块

❗额外段落类型 (EPT) - 全新的 Paragraphs 体验

额外段落类型 (EPT) - 类似的基于 Paragraph 的模块集合。

演示 EPT 模块 滚动

滚动
22/02/2025, by 匿名 (未验证)
论坛

你好。问题突然出现了。我正在使用Zen主题创建网站,设置了深色背景,但主页上的文章需要浅色背景。我开始用Firebug查看如何更好地处理,但意外遇到了一个问题,为什么主页上发布的文章的边界会覆盖到前一个块。而在代码中,这些块似乎又在文章的主体内……真是糟糕。 

这是页面的代码:

 

<div id="page">

 

  <header id="header" role="banner">

 

    <?php if ($logo): ?>

      <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>

    <?php endif; ?>

 

    <?php if ($site_name || $site_slogan): ?>

      <hgroup id="name-and-slogan">

        <?php if ($site_name): ?>

          <h1 id="site-name">

            <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>

          </h1>

        <?php endif; ?>

 

        <?php if ($site_slogan): ?>

          <h2 id="site-slogan"><?php print $site_slogan; ?></h2>

        <?php endif; ?>

      </hgroup><!-- /#name-and-slogan -->

    <?php endif; ?>

 

   

 

    <?php print render($page['header']); ?>

 

  </header>

 

<div id="main">

 

<div class="content-wrapper">

<div id="content" class="column" role="main">

 <?php print render($page['highlighted']); ?>

 <?php print $breadcrumb; ?>

 <a id="main-content"></a>

 

 <?php print $messages; ?>

 <?php print render($tabs); ?>

 <?php print render($page['help']); ?>

 <?php if ($action_links): ?>

<ul class="action-links"><?php print render($action_links); ?></ul>

 <?php endif; ?>

 <?php print render($page['content']); ?>

 <?php print $feed_icons; ?>

</div><!-- /#content -->

 

<div id="navigation">

 

 <?php if ($main_menu): ?>

<nav id="main-menu" role="navigation">

 <?php

 // 这个代码片段很难修改。我们建议在子主题的设置表单中关闭“主菜单”,删除这个PHP

 // 代码块,而是使用“菜单块”模块。

 // @see http://drupal.org/project/menu_block

 print theme('links__system_main_menu', array(

'links' => $main_menu,

'attributes' => array(

 'class' => array('links', 'inline', 'clearfix'),

),

'heading' => array(

 'text' => t('Main menu'),

 'level' => 'h2',

 'class' => array('element-invisible'),

),

 )); ?>

</nav>

 <?php endif; ?>

 

 <?php print render($page['navigation']); ?>

 </div><!-- /#navigation -->

 

<?php

 // 渲染侧边栏以查看是否有内容。

 $sidebar_first  = render($page['sidebar_first']);

 $sidebar_second = render($page['sidebar_second']);

?>

 

<?php if ($sidebar_first || $sidebar_second): ?>

 <aside class="sidebars">

<?php print $sidebar_first; ?>

<?php print $sidebar_second; ?>

 </aside><!-- /.sidebars -->

<?php endif; ?>

</div>

  </div><!-- /#main -->

 

  <?php print render($page['footer']); ?>

 

</div><!-- /#page -->

 

<?php print render($page['bottom']); ?>