css例子

/*
*创建人:蔺宜忠
*用途:学习css,应用于新闻系统
*/
*
{
    /*把默认值设置为0*/
    margin: 0;
    padding: 0;
    border-width: 0;
}
body
{
    font-size: 14px;
}
a:link,a:visited
{
    /*鼠标未移上去的状态、超链接访问后的样式*/
    color: Black;
    text-decoration: none;
}
a:hover
{
    /*鼠标移到超链接上的样式*/
    color: red;
    text-decoration: underline;
}
#top, #search, #main, #footer
{
    /*公共样式*/
    margin: 10px auto 10px auto;
    width: 760px;
}

#top
{
    /*顶部样式*/
}
#search
{
    /*搜索区*/
}
.test
{
    border-width: 0;
}
#main
{
    /*可变内容区*/
    height: 313px;
    margin-bottom: 10px;
}
#footer
{
    /*底部设置*/
    text-align: center;
    border-top: solid 1px #0df;
    padding-top: 10px;
    clear: left;
}
.textbox
{
    /*所有文本框的颜色*/
    border: solid 1px black;
    background-color: Aqua;
}
.button
{
    /*所有Button的格式*/
    border: solid 1px black;
    background-color: Olive;
}
input
{
    vertical-align: middle;
}
ul, li
{
    /*项目列表样式*/
    list-style-type: none;
}
li
{
    text-align: center;
    margin: 20px;
}
li a:link a:visited
{
    /*项目列表下连接的样式*/
    color: blue;
    text-decoration: underline;
    font-weight: bold;
}
li a:hover
{
    color: Red;
}
.commonFrm
{
    /*新闻分类、最新新闻、热点新闻样式*/
    border: solid 1px blue;
    width: 100%;
    float: left;
}
.commonFrm table
{
    /*表格的样式*/
    width: 100%;
    text-align: center;
    border-collapse: collapse; /*细线表格*/
}
.commonFrm table th, .commonFrm table td
{
    /*新闻列表中的格式*/
    padding: 3px 3px 3px 3px;
}
.commonFrm h4
{
    /*框架标题*/
    color: White;
    background-color: Blue;
    padding: 3px 3px;
}
#category
{
    /*新闻分类框架*/
    width: 180px;
    height: 309px;
    margin-right: 5px;
}
#hotNews
{
    /*热点新闻框架*/
    width: 566px;
    margin-left: 5px;
}
#newNews
{
    /*最新新闻框架*/
    margin-bottom: 5px;
    width: 566px;
    margin-left: 5px;
}
.thCategory
{
    width: 25%;
}
.thTime
{
    width: 25%;
}
#newNews_list
{
    /*新闻列表的网页的新闻列表格式*/
    margin-bottom: 5px;
    width: 566px;
    margin-left: 5px;
    height: 309px;
}
.commonFrm comment
{
    /*搜索新闻结果样式*/
    margin-bottom: 5px;
    width: 100%;
    margin-left: 5px;
    height: 309px;
}
.commonFrm .content
{
    /*新闻内容格式*/
    text-indent: 2em;
    line-height: 25px;
    margin: 10px;
}
.commonFrm .time
{
    /*新闻内容时间格式*/
    text-align: right;
    line-height: 25px;
    margin: 10px;
    color: Blue;
    font-size: 12px;
}
.deleteComment
{
    /*删除评论连接格式*/
    border: solid 1px blue;
    margin: 3px;
    padding: 2px;
}
#alinkComment
{
    /*回复新闻超链接的格式*/
    width: 70px;
    height: 18px;
    margin: 5px;
    border: solid 1px blue;
    padding: 3px;
    float: left;
    text-align: center;
    line-height: 20px;
    color: Blue;
}
.code
{
    /*验证码、确定格式*/
    margin: 1px 5px 5px 5px;
    border: solid 1px blue;
    vertical-align: middle;
}
.addComment
{
    /*增加评论格式*/
    border: solid 1px blue;
    padding: 5px;
}

/*管理员页面格式*/
/************************************************/
#categoryMan
{
    /*新闻分类框架*/
    width: 180px;
    height: 309px;
    margin-right: 5px;
}
.categoryMan
{
    /**/
    border: solid 1px blue;
    width: 100%;
    float: left;
}
.categoryMan h4
{
    /*框架标题*/
    color: White;
    background-color: Blue;
    padding: 3px 3px;
    text-align: center;
}
.categoryMan table
{
    /*表格的格式*/
    width: 100%;
    text-align: center;
    vertical-align: middle;
}
.categoryMan table
{/*表格线的格式*/
    border-collapse: collapse;
}
.categoryMan td, .categoryMan th
{
    /*显示表格*/
    border: solid 1px blue;
    padding: 2px;
}
.categoryMan a:link, .categoryMan a:visited
{
    /*超链接的访问前后的颜色*/
    color: Blue;
}
.addCategoryDiv
{
    /*添加新闻类别格式*/
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    height: 20px;
    position: relative;
    top: 18%;
}
.addCategory
{
    /*添加类别*/
    border: solid 1px blue;
    margin: 5px;
}
#note
{
    /*提示格式*/
    text-align: center;
    color: Red;
    margin: 10px;
}
#addNews,#changeNews
{
    /*新闻列表的网页的新闻列表格式*/
    margin-bottom: 5px;
    width: 566px;
    margin-left: 5px;
    height: 309px;
}
#addNewsTitle, #addNewsContent, #addNewsCon, #btnAddNews,#changeNewsTitle, #changeNewsCon, #btnChangeNews
{
    /**/
    width: 100%;
    margin: 4px 4px 4px 4px;
}
.addNewsAsp
{
    /**/
    border: solid 1px blue;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值