main.css

本文详细介绍了CSS样式的应用,包括字体大小、颜色设置、按钮样式、表单元素样式等,并针对不同元素提供了具体的样式配置方法。

/* CSS Document */
body{font-size:12px;color:#1b4f9a;/*background:#EEFCFF;背景颜色*/}
input,textarea,select{ border:1px solid #aaa;}
input:focus,textarea:focus,select:focus{ border:1px solid #72adfc;}
/*=按钮=*/
input.btn{ background:url(../images/btn_bg.jpg) left center repeat-x;color:#333333; font-family:Arial, "宋体", sans-serif; vertical-align:middle;padding:0px 12px;}
/*修正ie6按钮样式*/
* html input.btn{ padding:3px 3px 0 3px;}
* + html input.btn{ padding:3px 3px 0 3px;}

textarea{width:500px;height:100px;/*=调试用,可以删除=*/}

#Panel_Content a{color:#1B4F9A;}
#Panel_Content a:hover{color:#f00;}
#Panel_Content{ width:100%;margin:0 auto;line-height:28px;text-align:left;}
#Panel_Content #lbTrainExp{}
#Panel_Content #lbTrainExp ul{ list-style:none; width:100%}
#Panel_Content #lbTrainExp ul li{ float:left; padding:5px; }
/*=当前位置=*/
#Panel_Content .location{background:#EEFCFF;color:#1B4F9A;line-height:2em;padding-left:12px;border-bottom:1px solid #B8CDEA;}

/*=栏目列表=*/
.add_con{width:97%;margin:9px auto;border:1px solid #B8CDEA; color:#1B4F9A; }
#Panel_Content .columnList{width:97%;margin:9px auto;border:1px solid #B8CDEA; color:#1B4F9A; position:relative;}
#Panel_Content .columnList a{margin:0 6px;}
#Panel_Content .columnList a.current{color:#f00;}
#Panel_Content .columnList span.btnList{ position:absolute; right:0; bottom:0; text-align:right;margin:0 6px;}

/*=页码=*/
#Panel_Content .page{ text-align:right;width:97%;margin:0 auto;font-family:"宋体";}
#Panel_Content .page input{width:24px;}

/*=搜索=*/
#Panel_Content .search{ width:97%;margin:0 auto;}
#Panel_Content .search input#txtSearch{height:20px;margin:0 2px;}

/*=帮助=*/
#Panel_Content a.help:hover{ color:#666;}
.helpTips{
  position:relative;
  width:100%;
  margin:0;
  padding:0;
  display:inline;
}
/*隐藏点击帮助后出现的虚线框*/
.helpTips a{
  hide-focus: expression(this.hideFocus=true);  /* for ie 5+ */
  outline: none;  /* for firefox 1.5 + */}
.helpTips div{
   position: absolute;
 font-size:12px;
 z-index:99;
 display:none;
 line-height:1.5em;text-align:left;
 padding:16px 2px 2px 2px;
 background-color:#ccF6FF;
 border:1px solid #ccc;
 /*透明*/
 filter:alpha(opacity=95);/* IE */
 -moz-opacity:0.95; /* Moz + FF */
 opacity: 0.95; /*支持CSS3的浏览器(FF 1.5也支持)*/
 /*定位*/
 top:16px;
}
.helpTips table{  line-height:25px; background:#fff;}
#Panel_Content .helpTips a.closeBtn { position:absolute; right:0; top:0; margin:0;padding:0 3px;font-size:14px; line-height:1em; font-weight:normal; background:#fff; color:green; float: right; font-family: Verdana, Arial, Helvetica, sans-serif; border:1px solid #08a; }
#Panel_Content .tblList .operation a.closeBtn{ margin:0;}
#Panel_Content .helpTips a.closeBtn:hover{ text-decoration:none; }

/*========列表&表单&提示 共用=========*/
#Panel_Content .tblList,
#Panel_Content .tblForm,
#errorTip
{width:97%;border:1px solid #B8CDEA;line-height:28px;border-collapse:collapse; /*=合并表格内外边框=*/background:#fff;}
#Panel_Content .tblList th,
#Panel_Content .tblList td,
#Panel_Content .tblForm th,
#Panel_Content .tblForm td{ padding:0 6px;border:1px solid #B8CDEA; }
#Panel_Content .tblList th,
#Panel_Content .tblForm th{ font-weight:normal; color:#0b4f9a;}

/*========列表=========*/
#Panel_Content .tblList{margin:9px auto;}
#Panel_Content .tblList th{ text-align:center; background:#EEFCFF;}
#Panel_Content .tblList .operation,
#Panel_Content .tblList .time{text-align:center;}
#Panel_Content .tblList .operation a{ margin:0 6px;}

/*========表单=========*/
#Panel_Content .tblForm{margin:0 auto 18px auto;}
#Panel_Content .tblForm caption{font-size:14px;font-weight:bold;margin-top:18px;}
* html #Panel_Content .tblForm{margin-top:18px;}#Panel_Content a.help{color:#333;}
#Panel_Content .tblForm th{ text-align:right; width:120px;}
/*=隔行背景颜色=
#Panel_Content .tblForm .alt{ background:#fafafa;}*/

/*========错误提示========*/
#errorTip{ margin:18px auto; text-align:left;}
#errorTip p{ border-bottom:1px solid #B8CDEA; padding:0 1em; }
#errorTip p.reason{ padding:1em 2em;}
#errorTip p.reason span{ display:block; color:blue}
#errorTip p.reason span#td_Message{color:#1B4F9A}

 

/*============蒯伟加的样式,为了邀请函的样式==============*/

#Panel_Show a{color:#1B4F9A;}
#Panel_Show a:hover{color:#f00;}
#Panel_Show{ width:100%;margin:0 auto;line-height:28px;text-align:left;}

/*=当前位置=*/
#Panel_Show .location{background:#EEFCFF;color:#1B4F9A;line-height:2em;padding-left:12px;border-bottom:1px solid #B8CDEA;}

/*=栏目列表=*/
#Panel_Show .columnList{width:97%;margin:9px auto;border:1px solid #B8CDEA; color:#1B4F9A; position:relative;}
#Panel_Show .columnList a{margin:0 6px;}
#Panel_Show .columnList a.current{color:#f00;}
#Panel_Show .columnList span.btnList{ position:absolute; right:0; bottom:0; text-align:right;margin:0 6px;}

#Panel_Show .tblList th,
#Panel_Show .tblList td,
#Panel_Show .tblForm th,
#Panel_Show .tblForm td{ padding:0 6px;border:1px solid #B8CDEA; }
#Panel_Show .tblList th,
#Panel_Show .tblForm th{ font-weight:normal; color:#0b4f9a;}

/*========列表=========*/
#Panel_Show .tblList{margin:9px auto;}
#Panel_Show .tblList th{ text-align:center; background:#EEFCFF;}
#Panel_Show .tblList .operation,
#Panel_Show .tblList .time{text-align:center;}
#Panel_Show .tblList .operation a{ margin:0 6px;}

/*========表单=========*/
#Panel_Show .tblForm{margin:0 auto 18px auto;}
#Panel_Show .tblForm caption{font-size:14px;font-weight:bold;margin-top:18px;}
* html #Panel_Show .tblForm{margin-top:18px;}#Panel_Content a.help{color:#333;}
#Panel_Show .tblForm th{ text-align:right; width:120px;

### main.css 文件的创建与位置 在 Vue 项目中,`main.css` 文件通常用于存放全局样式。这类文件的位置和创建方式可以根据项目的具体配置有所不同,但以下是一些常见的情况和实践[^1]。 #### 1. **默认位置** 在使用 Vue CLI 创建项目时,`main.css` 或类似的全局样式文件通常会位于 `src/assets` 或 `src/styles` 目录下。例如: - `src/assets/main.css` - `src/styles/main.css` 如果项目没有预先创建这样的目录结构,开发者可以手动创建 `assets` 或 `styles` 目录,并将 `main.css` 文件放置其中。 #### 2. **引入方式** 为了使 `main.css` 文件生效,需要在项目的入口文件(通常是 `src/main.js`)中引入它。以下是一个示例代码片段: ```javascript // src/main.js import Vue from 'vue'; import App from './App.vue'; import './assets/main.css'; // 引入 main.css 文件 new Vue({ render: (h) => h(App), }).$mount('#app'); ``` #### 3. **其他可能的位置** 如果项目使用了 CSS 预处理器(如 Sass、Less 或 Stylus),`main.css` 可能会被替换为预处理器的文件格式,例如 `main.scss` 或 `main.less`。这些文件同样可以放置在 `src/assets` 或 `src/styles` 目录下,并通过类似的方式引入到项目中[^1]。 #### 4. **动态生成的样式** 在某些情况下,`main.css` 文件可能是由构建工具(如 Webpack)根据项目的配置自动生成的。这种情况下,开发者只需确保在项目中正确配置了相关依赖,并将样式规则写入源文件中。 ### 示例:手动创建 `main.css` 以下是手动创建 `main.css` 文件并引入的步骤: 1. 在项目根目录下导航至 `src` 文件夹。 2. 创建一个名为 `assets` 的文件夹(如果尚未存在)。 3. 在 `assets` 文件夹中创建 `main.css` 文件。 4. 编辑 `main.css` 文件,添加所需的样式规则。 5. 在 `src/main.js` 中引入该文件。 ```css /* src/assets/main.css */ body { font-family: Arial, sans-serif; margin: 0; padding: 0; } ``` ```javascript // src/main.js import './assets/main.css'; ``` #### 注意事项 - 如果项目启用了 CSS Modules 或其他高级功能,可能需要额外配置以支持全局样式的正确加载[^2]。 - 确保安装了必要的依赖项(如 `css-loader` 和 `style-loader`),以便 Webpack 能够正确处理 `.css` 文件。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值