CSS 1.css介绍 css指的是层叠样式表(cascading style sheets) 官方文档:https://www.w3school.com.cn/css/index.asp为什么需要c
顺晟科技
2021-09-13 12:28:19
163
4.指定id下指定class的子元素的样式:(可以反过来用,通过class找id) #sidebar .content1 { height:auto; position:absolute; top:30px;bottom:7px;width:116px; background:url(../images/ydzy_img/left_tree_center.png) repeat-y center top; } 5.给所有的文本框定义样式 input[type="text"]{ width:40%; } 下拉 select{ width:50%; } 给所有的文本框和下拉框定义样式 input[type="text"],select{ width:40%; } 给按钮定义样式 input[type=button]{width:63px;height:23px;text-align:center;line-height:23px;color:#fff;font-size:12px;border:0px;background:transparent url(../images/btn_bgs.png) repeat-x center center;} 给id="citySel"的文本框定义样式 input[type="text"]#citySel{ width:60%; } 给id="grid"的表格的行列定义样式 #grid tr{border-right:1px solid transparent} #grid td{font-size:13px;} 给class="pg_pager"下的所有td定义样式 .pg_pager td{border:0px;color:rgb(34, 34, 34);font-size:14px;} 6.根据路径定义内层样式,例如找到内层表格的td并定义样式(可以越级,但是路径要正确) .main_bodys_wyyfsgl #searchCondition>div> table td{ width:200px; } .main_bodys_vyywh #searchCondition>div> table td>span { position:absolute; left:85px;right:0px; width:auto; } .main_bodys_vyywh #searchCondition>div> table td>span input[type=text],table td>span select {margin-top:0px !important;width:} .main_bodys_wyyfsgl .ui-dialog .ui-dialog-content form{padding-right:50px} .main_bodys_vyywh img#show{float:left;} .main_bodys_vyywh img#showE{float:left;} 注:如果是找下级 id或class之间用空格,如果并列定义同一个样式用逗号 *****html自有标签和id或class之间可以不用空格 img#showE 实际过程中要根据情况调试 滚动条一般用在div标签 style="overflow-y:scroll;" #addform,#editform{ overflow: auto; } 7.同时使用两种样式 例如 class="btn-block button-ripple"
09
2022-11
09
2022-11
09
2022-11
09
2022-11
19
2022-10
19
2022-10