【请教】会做网页设计的请进。
我想问一下本站板块间明暗相见的条文是怎么实现的界面风格啊:) 这不是风格的事情。
要修改源码,具体你问HOPE,我记得以前也有人问过这个问题的。
另外鄙视dz,都到6.0版本了,还是没有这个功能。 不需要“修改源码”吧,这个很简单啊,在模板loop里边根据循环的次数指定tr的背景颜色就是了 首先拿出行号,除2取模,为0时为此行TR设置一个颜色,非0时设置一个颜色!!
仅此而已! 循环
if(RowNum%2==0){
<tr bgcolor='white'></tr>
}
else{
<tr bgcolor='black'></tr>
}
上面的也不知道写了什么,好象把html和脚本混在一起了,呵呵
好像是css,但是不知道怎么修改实现这样的效果
/* Global */body {
margin: 0px;
scrollbar-base-color: {ALTBG1};
scrollbar-arrow-color: {BORDERCOLOR};
scrollbar-darkshadow-color: {BGBORDER};
{BGCODE};
color: {TEXT};
}
body, table, input, select, textarea, .maintable, .button, .altbg1, .altbg2 {
font: {FONTSIZE} {FONT};
}
.smalltxt, .category, .percenttxt {
font: {FONTSIZE} {SMFONT} !important;
font: {SMFONTSIZE} {SMFONT};
}
.lighttxt {
color: {LIGHTTEXT}
}
a {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:visited {
text-decoration: none;
color: #990099;
}
table {
color: {TABLETEXT};
empty-cells: show;
border-collapse: separate !important;
border-collapse: collapse;
}
input, select, textarea {
color: {TABLETEXT};
font-weight: normal;
background-color: {ALTBG1};
border: 1px solid {INPUTBORDER};
}
input {
height: 21px;
}
form {
margin: 0px;
padding: 0px;
}
legend {
color: {TEXT};
}
.checkbox, .radio {
border: 0px;
background: none;
vertical-align: middle;
height: 16px;
}
.maintable {
width: {MAINTABLEWIDTH};
}
.subtable {
text-align: left;
padding: 0;
margin: 0 auto;
}
.simpletable {
border: {BORDERWIDTH}px solid {BORDERCOLOR};
padding: 1px;
clear: both;
background-color: {ALTBG2};
}
.simpletable .header {
{HEADERBGCODE};
padding-top: 7px;
padding-bottom: 0px;
height: 21px !important;
height: 30px;
}
.simpletable div {
padding: {TABLESPACE}px;
}
.nav {
color: {NAVTEXT};
font-weight: {BOLD};
}
.nav a {
color: {NAVTEXT};
}
.absmiddle {
vertical-align: middle;
}
.msgbody {
overflow: hidden;
width: auto !important;
width: 100%;
}
.msgheader {
margin: 0 1em;
border: 1px solid {CATBORDER};
font-weight: bold;
background: {MSGHEADER};
padding: 5px;
color: {MSGHEADERTEXT};
}
.msgborder {
margin: 0 1em;
padding: 10px;
border: 1px solid {CATBORDER};
border-top: 0px;
word-wrap: break-word;
background: {MSGTEXT};
overflow: hidden;
width: auto !important;
width: 100%;
}
.tableborder {
background: white;
outline: {BORDERWIDTH}px solid {BORDERCOLOR};
border: 0px !important;
border: {BORDERWIDTH}px solid {BORDERCOLOR};
}
.spaceborder {
width: 100%;
border: {BORDERWIDTH}px solid {BORDERCOLOR};
padding: 1px;
clear: both;
background-color: {ALTBG2};
}
.adborder {
width: 100%;
border: 0px solid {BORDERCOLOR};
padding: 1px;
clear: both;
background-color: {ALTBG2};
}
.singleborder {
font-size: 0px;
line-height: {BORDERWIDTH}px;
padding: 0px;
background-color: {ALTBG1};
}
.button {
padding: 0 5px;
color: {HEADERTEXT};
{HEADERBGCODE};
background-repeat: repeat-x;
background-position: 0 50%;
outline: 1px solid {BORDERCOLOR};
border: 1px solid #FFF !important;
height: 19px !important;
border: 1px solid {BORDERCOLOR};
height: 21px;
line-height: 17px;
}
.lightbutton {
background: {ALTBG2};
border: 1px solid {BGBORDER};
color: {LINK};
}
.submitbutton {
margin-top: 8px !important;
margin-top: 6px;
margin-bottom: 5px;
text-align: center;
}
.postsubmit {
border: 1px solid {CATBORDER};
{CATBGCODE};
text-align: center;
padding: 10px 0px;
margin-top: 6px;
}
.bold {
font-weight: {BOLD};
}
.header {
font-weight: {BOLD};
color: {HEADERTEXT};
{HEADERBGCODE};
height: 22px;
padding-left: 10px;
}
.header td {
padding-left: 10px;
}
.header a {
color: {HEADERTEXT};
}
.header input {
background:none;
vertical-align: middle;
height: 16px;
}
.category {
color: {CATTEXT};
{CATBGCODE};
}
.category td {
border-bottom: 1px solid {CATBORDER};
}
.altbg1 {
background: {ALTBG1};
}
td.altbg1 {
border-bottom: 1px solid {BGBORDER};
}
.altbg2 {
background: {ALTBG2};
}
td.altbg2 {
border-bottom: 1px solid {BGBORDER};
}
.row {
width: 100%;
border: none;
background: {ALTBG2};
empty-cells: show;
}
.row td {
padding: {TABLESPACE}px;
border-bottom: 1px solid {BGBORDER};
}
.row1 {
width: 100%;
border: none;
background: {ALTBG1};
empty-cells: show;
}
.row1 td {
padding: {TABLESPACE}px;
border-bottom: 1px solid {BGBORDER};
}
.bottom, .bottom td, td.bottom {
border-bottom: 0px;
}
.spacebottom {
padding-bottom: 10px;
background: {ALTBG2};
}
.tdunderline td {
border-top: 1px solid {BGBORDER};
border-bottom: 1px solid {BGBORDER};
}
.option {
padding: 1px;
width: {TABLEWIDTH};
height: 35px;
border: 1px solid {BGBORDER};
background-color: {ALTBG1};
}
.avatar {
border: 1px solid {CATBORDER};
{CATBGCODE};
padding: 3px;
}
.avatar img {
background: {BGCOLOR};
}
.left {
float: left;
text-align: left;
padding: 0px;
}
.right {
float: right;
text-align: right;
padding: 0px;
}
.center {
float: center;
text-align: center;
padding: 0px;
}
.line {
border-top: 1px solid {BGBORDER};
}
.percent {
height: 10px !important;
height: 12px;
border: {BORDERWIDTH}px solid {BORDERCOLOR};
float: left;
padding: 0px;
}
.percent div {
{HEADERBGCODE};
background-repeat: repeat-x;
background-position: 0 50%;
width: 100%;
height: 8px;
line-height: 0px;
font-size: 0px;
margin: 1px;
padding: 0px;
}
.percenttxt {
float:left;
padding-top: 2px !important;
padding-top: 1px;
font-weight: {BOLD};
}
.percenttxt u {
text-decoration: none;
font-weight: normal;
color: {LIGHTTEXT};
}
.mainborder {
clear: both;
height: 8px;
font-size: 0px;
line-height: 0px;
padding: 0px;
background-color: {MAINBORDER};
}
.wysiwyg {
font: {MSGFONTSIZE} {FONT};
border: 1px #DDDDDD solid;
padding: 4px;
word-break: break-all;
color: {TABLETEXT};
}
.wysiwyg a {
text-decoration: underline;
color: {LINK};
}
.autosave {
behavior: url(#default#userdata);
}
#seccode {
cursor:pointer;
margin-bottom: 2px;
}
/* Header */
.logo {
{BGCODE};
}
.logo div.right {
margin: 0px 0px;
}
.mainheader {
background-color: {ALTBG1};
padding: 6px 0px;
}
.headermenu_popup {
color: {MENUTEXT};
border: 1px solid {BORDERCOLOR};
border-top: 0px;
margin-top: 8px !important;
}
.headermenu_popup a {
color: {MENUTEXT};
text-decoration: none;
}
.menu {
{HEADERMENUBGCODE};
margin-top: 0px;
}
.menu div {
text-align: left;
background-color: {ALTBG2};
}
.menu div, .menu div a {
color: {HEADERMENUTEXT};
padding-top: 7px !important;
padding-top: 6px;
}
.menu div span {
height: 5px;
}
/* Footer */
.footerline {
height: 6px;
border-bottom: 1px solid {BORDERCOLOR};
}
.footerline div {
{BGCODE};
position: relative;
float: right;
right: 40px;
top: 2px;
}
/* Multi Page */
.p_bar {
margin: 1px 0px;
clear: both;
}
.p_bar a {
float: left;
padding: 1px 4px;
font-size: 12px;
text-decoration: none;
}
.p_input {
border: 0px;
padding: 0px;
width: 40px;
height: 17px !important;
height: 15px;
margin: 0px;
background: {ALTBG2};
}
.p_total {
background-color: {ALTBG1};
border: 1px solid {BORDERCOLOR};
border-right: 0px solid {BORDERCOLOR};
font-weight: {BOLD};
}
.p_pages {
background-color: {ALTBG1};
border: 1px solid {BORDERCOLOR};
margin-right:1px;
vertical-align: middle;
font-weight: {BOLD};
}
.p_num {
background-color: {ALTBG2};
border: 1px solid {CATBORDER};
margin-right:1px;
vertical-align: middle;
}
a:hover.p_num{
background-color: {ALTBG1};
border: 1px solid {BORDERCOLOR};
text-decoration: none;
}
.p_redirect {
background-color: {ALTBG2};
border: 1px solid {CATBORDER};
margin-right:1px;
font-size: 12px !important;
font-size: 13px;
}
a:hover.p_redirect {
background-color: {ALTBG1};
border: 1px solid {BORDERCOLOR};
text-decoration: none;
}
.p_curpage {
margin-right:1px;
border: 1px solid {CATBORDER};
vertical-align: middle;
{CATBGCODE};
color: {CATTEXT};
font-weight: {BOLD};
}
/* Popup Menu */
.popupmenu_popup {
color: {HEADERTEXT};
border: 1px solid {BORDERCOLOR};
}
.popupmenu_option {
background: {MENUBG};
color: {MENUTEXT};
white-space: nowrap;
padding: 3px 8px;
}
.popupmenu_option a {
color: {MENUTEXT};
padding: 3px 8px;
text-decoration: none;
}
.popupmenu_highlight {
background: {MENUHLBG};
color: {MENUHLTEXT};
white-space: nowrap;
padding: 3px 8px;
cursor: pointer;
}
.popupmenu_highlight a {
color: {MENUHLTEXT};
padding: 3px 8px;
text-decoration: none;
}
/* Popup Calendar */
.calendar_expire, .calendar_expire a:link, .calendar_expire a:visited {
color: {CALENDAREXPIRE};
}
.calendar_default, .calendar_default a:link, .calendar_default a:visited {
color: {CALENDARTEXT};
}
.calendar_checked, .calendar_checked a:link, .calendar_checked a:visited {
color: {CALENDARCHECKED};
}
.calendar_today, .calendar_today a:link, .calendar_today a:visited {
color: {CALENDARTODAY};
}
.calendar_header td{
width: 30px;
height: 20px;
}
#calendar_year {
display: none;
line-height: 130%;
background: {ALTBG2};
position: absolute;
z-index: 10;
}
#calendar_year .col {
float: left;
background: {ALTBG2};
margin-left: 1px;
border: 1px solid {BORDERCOLOR};
padding: 4px;
}
#calendar_month {
display: none;
background: {ALTBG2};
line-height: 130%;
border: 1px solid {BORDERCOLOR};
padding: 4px;
position: absolute;
z-index: 11;
}
/* Index */
#announcement {
border: 1px solid {CATBORDER};
{CATBGCODE};
margin-bottom: 5px;
padding: 5px 1px;
display: none;
clear: both;
width: {TABLEWIDTH};
}
.todayposts {
color: {LINK};
}
/* New Special Menu */
.newspecial {
text-align: center;
font-size: 14px;
font-weight: {BOLD};
}
.newspecialmenu {
width: 86px !important;
width: 88px;
}
/* Forumdisplay */
.f_folder {
width: 4%;
text-align: center;
}
.f_icon {
width: 4%;
text-align: center;
}
.f_title {
width: 50%;
word-break: break-all;
}
.f_title span {
color: {LIGHTTEXT};
}
.subject a, .f_title a {
color: {TABLETEXT};
}
.f_author {
width: 12%;
text-align: center;
}
.f_views {
width: 6%;
text-align: center
}
.f_posts {
width: 5%;
text-align: center
}
.f_last {
width: 14%;
text-align: left;
}
/* Viewthread */
.t_row {
margin-top: -1px;
}
.t_rown {
margin-top: -1px;
background: #E3E3E3;
}
.t_user {
word-break: break-all;
padding-left: 8px;
background: {ALTBG1};
}
.t_msg {
table-layout: fixed;
word-wrap: break-word;
width: 100%;
height: 100%;
overflow: hidden;
background: {ALTBG2}
}
.t_msg p {
margin: 0px;
}
.t_msg td {
padding: 2px 10px;
}
.t_signature {
height: expression(signature(this));
}
.t_number {
border: 0px solid {CATBORDER};
padding: 2px;
margin: 1px;
}
.t_infoline {
background: {POSTNOTICEBG};
}
.t_table {
border-left: 1px solid {BORDERCOLOR};
border-top: 1px solid {BORDERCOLOR};
border-spacing: 0px;
}
.t_table td {
padding: 4px;
border-bottom: 1px solid {BORDERCOLOR};
border-right: 1px solid {BORDERCOLOR};
}
.t_attach {
width: 350px;
background: {ALTBG2};
border: 1px solid {BORDERCOLOR};
padding: 4px;
}
.t_attachlist {
padding: 5px;
border-bottom: 0px;
}
.t_msgfont, .t_msgfont table {
font-size: {MSGFONTSIZE};
}
.t_smallfont, .t_smallfont table {
font-size: {MSGSMALLSIZE};
}
.t_bigfont, .t_bigfont table {
font-size: {MSGBIGSIZE};
}
/* Frame */
.leftmenu br {
line-height: 5px;
}
.leftmenu {
line-height: 18px;
} 要用脚本控制CSS的,
比如用jsp:
<%
if(rownum%2==0){
%>
<tr class='a'>
<%
}
else{
%>
<tr class='b'>
<%
}
%>
改CSS是没用的
[ Edited bymajkl on 2007-10-8 15:57 ] **\ 可惜偶不会
谢谢讲解 傻瓜点的话就在页面里面把 bgcolor一个一个标注。。。
好点的方法就是用js + css 来控制下background-color的属性
方法6#的就可以
不过坛子好像是用 Discuz! 5.6.0 的,这种论坛模板里面应该有功能直接可以修改吧~~
资深的xd继续:) Posted by coliwa on 2007-10-8 16:07 http://www.ibmnb.com/images/common/back.gif
傻瓜点的话就在页面里面把 bgcolor一个一个标注。。。
好点的方法就是用js + css 来控制下background-color的属性
方法6#的就可以
不过坛子好像是用 Discuz! 5.6.0 的,这种论坛模板里面应该有功能直接可以修 ...
风格应该是老大做的
新增了好多东西
偶仿的完成了80+%(不包括功能)
[ Edited byfanjianming on 2007-10-8 16:51 ]
页:
[1]