CSS样式笔记
组合样式,CSS继承
.content { padding:0 0 0 5px; line-height: 30px; height: 30px; border: 1px solid #a6bee7; vertical-align: middle; }
/*不加空格,则表示class="content small"且small只有跟在content后面有效,否则无效
有效,如<div class="content small">则div的宽度是29.如果.content .small有空格,则表示,content的子元素的样式是small,子元素继承content的样式如<div class="content"><div class="small">*/
.content.small { width: 29%; }
.content.medium { width: 42.5%; }
.content.large { width: 92%; }
设置label标签样式,去掉每行都有边框
.disabled-label { width:90%; color:#cccccc; border: 1px solid #cccccc; display: inline-block; }
<asp:Label ID="Reason" runat="server" CssClass="disabled-label"></asp:Label>
IE8下 Select文字垂直居中的办法
.select { padding: 4px 0; height: 30px; line-height: 26px; vertical-align: middle; }
让DIV内的li横向居中显示
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <style> .utop { } .utop ul { display: table; margin-left: auto; margin-right: auto; } .utop ul li { float: left; text-decoration: none; border-style: none; list-style-type: none; padding:4px; } </style> </head> <body> <div class="utop"> <ul><li>sd</li><li>sd</li></ul> </div> </body> </html>
对修改封闭,向扩展开放,我反而更向往自由
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】Flutter适配HarmonyOS 5知识地图,实战解析+高频避坑指南
【推荐】凌霞软件回馈社区,携手博客园推出1Panel与Halo联合会员
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 领域驱动设计实战:聚合根设计与领域模型实现
· 突破Excel百万数据导出瓶颈:全链路优化实战指南
· 如何把ASP.NET Core WebApi打造成Mcp Server
· Linux系列:如何用perf跟踪.NET程序的mmap泄露
· 日常问题排查-空闲一段时间再请求就超时
· 在 .NET 中使用 Sqids 快速的为数字 ID 披上神秘短串,轻松隐藏敏感数字!
· c#开发完整的Socks5代理客户端与服务端——客户端(已完结)
· c# 批量注入示例代码
· 【Uber 面试真题】SQL :每个星期连续5星评价最多的司机
· .net core workflow流程定义