CSS-Styled列表:例子,指南和最佳实践

Different Uses of Styled Lists

1-Custom Select Box

CSS-Styled列表:例子,指南和最佳实践_第1张图片

Js代码
  1. <dl class="dropdown">   
  2. <dt id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)" class="module">Recent Archives</dt>   
  3.   
  4. <dd id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)">   
  5. <ul>   
  6.     <li><a href='http://www.darrenhoyt.com/2008/06/' title='June 2008'>June 2008</a></li>   
  7.     <li><a href='http://www.darrenhoyt.com/2008/05/' title='May 2008'>May 2008</a></li>   
  8.     <li><a href='http://www.darrenhoyt.com/2008/04/' title='April 2008'>April 2008</a></li>   
  9. </ul>   
  10. </dd>   
  11. </dl>  
 

2-Code Blocks

CSS-Styled列表:例子,指南和最佳实践_第2张图片

<div id="portfolio">
<ul id="gallery">
<li><img src="/{client}/before.jpg" /></li>
<li><img src="/{client}/sketch.jpg" /></li>
<li><img src="/{client}/wireframe.jpg" /></li>
<li><img src="/{client}/after.jpg" /></li>
</ul>
<img id="frame" width="580" height="415" src="frame.png" />
<ul id="sequence">
<li id="before"><a href="/{client}/before.jpg"><a></li>
<li id="sketch"><a href="/{client}/sketch.jpg"><a></li>
<li id="wireframe"><a href="/{client}/wireframe.jpg"><a></li>
<li id="after"><a href="/{client}/after.jpg"><a></li>
</ul>
<a id="launch" rel="external" href="{url}">
<img src="launch.png" alt="Launch this site" />
</a>
</div>


3-Tabs

<ul id="home_button">
  <li><a href="javascript:void(0)" onMouseOver="showContent('home_welcome_content','home_button_welcome')" id="home_button_welcome" class="on">Welcome</a></li>
  <!-- <li><a href="javascript:void(0)" onMouseOver="showContent('home_mymonterey_content','home_button_mymonterey')" id="home_button_mymonterey">My Monterey</a></li> -->
  <li><a href="javascript:void(0)" onMouseOver="showContent('home_visitors_content','home_button_visitors')" id="home_button_visitors">Visitor's Guide</a></li>
  <li><a href="javascript:void(0)" onMouseOver="showContent('home_multimedia_content','home_button_multimedia')" id="home_button_multimedia">Multimedia Gallery</a></li>
  <!-- <li><a href="javascript:void(0)" onMouseOver="showContent('home_travelblog_content','home_button_travel')" id="home_button_travel">Travel Blog</a></li> -->
  <li><a href="javascript:void(0)" onMouseOver="showContent('home_weather_content','home_button_weather')" id="home_button_weather">Weather</a></li>
  <li><a href="javascript:void(0)" onMouseOver="showContent('home_surf_content','home_button_surf')" id="home_button_surf">Surf Report</a></li>
</ul>



4-Post’s Information

CSS-Styled列表:例子,指南和最佳实践_第3张图片

<ul>
  <li class="dateposted">Posted on: 19th November 2006</li>
  <li>Posted by: <a href="http://ifelse.co.uk">Phu</a></li>
  <li>Number of comments: <a href="http://ifelse.co.uk/archives/2006/11/19/cssedit-2-review/#comments">29</a></li>
  <li><a href="http://ifelse.co.uk/archives/2006/11/19/cssedit-2-review/#commentform">Add a comment</a></li>
</ul>

5-Popular Posts Block

6-Blog’s Comment

CSS-Styled列表:例子,指南和最佳实践_第4张图片

7-CSS Galleries

CSS-Styled列表:例子,指南和最佳实践_第5张图片

8-Text Blocks

Tutorials and Examples

1-Nested lists used to create a simple folder metaphore

CSS-Styled列表:例子,指南和最佳实践_第6张图片

2-Mini Slide Navigation

CSS-Styled列表:例子,指南和最佳实践_第7张图片

3-html vs css pt2/navigation lists

 /* html code */  <li><a class="item"> nav item </a></li>  <li class="active"><span class="item"> nav item </span></li>  /* css code */  li .item {display:block; padding:0.5em;}  /* css code alternative */  li a, li span {display:block; padding:0.5em;}


4-Floating next and back buttons using lists

CSS-Styled列表:例子,指南和最佳实践_第8张图片

 /* html code */  <li><a class="item"> nav item </a></li>  <li class="active"><span class="item"> nav item </span></li>  /* css code */  li .item {display:block; padding:0.5em;}  /* css code alternative */  li a, li span {display:block; padding:0.5em;}


5-Safe Lists Next to Left-Floated Elements

CSS-Styled列表:例子,指南和最佳实践_第9张图片

6-Style Your Ordered List

CSS-Styled列表:例子,指南和最佳实践_第10张图片

7-Centering List Items Horizontally

unOrdered Lists

8-Advanced CSS Menu Trick

unOrdered Lists

9-A Stripe of List Style Inspiration

你可能感兴趣的:(CSS-Styled列表:例子,指南和最佳实践)