在DIV+CSS排版中新闻列表的制作方法

news/2024/7/7 16:24:13 标签: css, div, url, float, class, list
class="baidu_pl"> <class="tags" href="/tags/DIV.html" title=div>div id="article_content" class="article_content clearfix"> <class="tags" href="/tags/DIV.html" title=div>div id="content_views" class="htmledit_views">

最终效果:

    class="list">
  • 2005年5月30日 新闻标题01
  • 2005年5月30日 新闻标题02
  • 2005年5月30日 新闻标题03
  • 2005年5月30日 新闻标题04

CSS代码:

 
.list{ 
    margin: 0px 10px 20px; 
    text-align: left;     
} 

.list ul{ 
    list-style-type: none; 
    margin: 0px; 
    padding: 0px; 
} 

.list li{ 
    background: class="tags" href="/tags/URL.html" title=url>url(/imagelist/06/31/gu432qq5q695.gif) repeat-x bottom;  
    /*列表底部的虚线*/ 
    width: 100%;     
} 

.list li a{ 
    color: #777777; 
    display: block; 
    padding: 6px 0px 4px 15px; 
    background: class="tags" href="/tags/URL.html" title=url>url(/imagelist/06/31/7ei20115t3sv.gif) no-repeat 0 6px; 
    /*列表左边的箭头图片*/ 
} 

.list li span{ 
    class="tags" href="/tags/FLOAT.html" title=float>float: right;/*使span元素浮动到右面*/ 
    text-align: right;/*日期右对齐*/ 
} 

.list li a:hover{ 
    color: #336699; 
    background: class="tags" href="/tags/URL.html" title=url>url(/imagelist/06/31/jq1ysff5b0ac.gif) repeat-x bottom; 
} 
        

注意:span一定要放在前面,反之会产生换行

 
<ul class="list"> 
<li><span>2005年5月30日 </span><a href="#">新闻标题01</a></li> 
<li><span>2005年5月30日 </span><a href="#">新闻标题02</a></li> 
<li><span>2005年5月30日 </span><a href="#">新闻标题03</a></li> 
<li><span>2005年5月30日 </span><a href="#">新闻标题04</a></li> 
</ul> 
  class="tags" href="/tags/DIV.html" title=div>div> class="tags" href="/tags/DIV.html" title=div>div> <class="tags" href="/tags/DIV.html" title=div>div id="treeSkill">class="tags" href="/tags/DIV.html" title=div>div>

http://www.niftyadmin.cn/n/1405861.html

相关文章

oracle用户创建及权限设置

权限&#xff1a; create session create table unlimited tablespace connect resource dba 例&#xff1a; #sqlplus /nolog SQL> conn / as sysdba; SQL>create user username identified by password SQL> grant dba to username; SQL> conn username/password…

中文排版CSS心得

先介绍如何设定字体、颜色、大小、段落空白等比较简单的应用&#xff0c;后面再介绍下比如首字下沉、首行缩进。最后讲一些常用的web页面中文排版&#xff0c;比如中文字的截断、固定宽度词内折行&#xff08;word-wrap和word-break&#xff09;等等。因为只是写一些应用方面的…

判断是否是手机浏览

public static bool IsMobile(){string agent (HttpContext.Current.Request.UserAgent "").ToLower().Trim();if (agent "" || agent.IndexOf("mozilla") ! -1 || agent.IndexOf("opera") ! -1) return false;return true;}

oracle 字段合并

今天在Oracle数据库的查询语句中&#xff0c;想将一个表的多个字段合并为一个字段来显示&#xff0c;于是就学SQL那样&#xff0c;select ab as c from table&#xff0c;然而总是报错&#xff0c;看来Oracle的语法跟SQL的语法还不完全一样&#xff0c;于是问了搞Oracle的同事&…

如何做好网站开发项目需求分析

一个网站项目的确立是建立在各种各样的需求上面的&#xff0c;这种需求往往来自于客户的实际需求或者是出于公司自身发展的需要&#xff0c;其中客户的实际需求也就是说这种交易性质的需求占了绝大部分。面对对网站开发拥有不同知识层面的客户&#xff0c;项目的负责人对用户需…

C#对Oracle存储过程的调用

--创建表declare num number; begin select count(1) into num from user_tables where table_nameSRCT; --判断当前要创建的表在数据库中是否存在.if num>0 then execute immediate drop table ||SRCT; --表名要大写end if; execute immediate CREATE TABLE SRCT ( S…

用CSS实现无图片圆角效果

<html><head><title>css圆角效果--网页教学网</title><meta http-equiv"content-type" content"text/html; charsetgb2312"><style type"text/css">div.RoundedCorner{background: #9BD1FA}b.rtop, b.rbott…

C#中将DataTable中数据导出到csv文件中

功能说明&#xff1a;实现将数据装换为csv格式&#xff0c;数据来源可以是任意的&#xff0c;先把数据保存到Datatable中&#xff0c;再转换为csv文件即可。 方法一&#xff1a;将内存 DataTable中数据保存到csv文件中 using System.Text; using System.IO; using System.D…