index.php代码


1.Margin & Padding

  例1:

  .div {

  margin-top:10px;

  margin-right: 5px;

  margin-bottom:30px;

  margin-left:0px;

  }.div {

  margin:10px 20px 0;

  }

  例3

  .div {

  margin-top:0;

  margin-right:auto;

  margin-bottom:0;

  margin-left:auto;

  }<div id="content" class="narrowcolumn">

   <?php if (have_posts()) : ?>

   <?php while (have_posts()) : the_post(); ?>

   <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

   <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo= 0')); ?>"><?php the_title(); ?></a></h2>

   <small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>

   <div class="entry">

   <?php the_content(__('阅读本条目的其余部分 »', 'kubrick')); ?>

   </div>

   <p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') .' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', '));

?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 条评论 »', 'kubrick'), __('% Comments »', '库布里克'), '', __('评论关闭', '库布里克') ); ?></p>

   </div>

   <?php endwhile; ?>

   <div class="导航">

   <div class="alignleft"><?php next_posts_link(__('« Older Entries', 'kubrick')) ?></div>

   <div class="alignright"><?php previous_posts_link(__('Newer Entries »', 'kubrick')) ?></div>

   </div>

   <?php 其他:?>

   <h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>

   <p class="center"><?php _e('抱歉,您正在寻找不在这里的东西。', 'kubrick'); ?></p>

   <?php 包含 (TEMPLATEPATH ."/searchform.php"); ?>

   <?php endif; ?>

   </div>

  <?php get_sidebar(); ?>

  <?php get_footer(); ?>

<?php get_header(); ?>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM