随笔分类 -  HTML/CSS

普通表格table样式美化
摘要:```css table { width: 100%; border-collapse: collapse; border-spacing: 0; empty-cells: show; border: 1px solid #e9e9e9; } table th { background: #f7f7 阅读全文

posted @ 2023-08-26 16:59 小馬過河﹎ 阅读(203) 评论(0) 推荐(0) 编辑

textarea中禁止使用换行(回车)
摘要:<textarea name="jfcate_name" rows="10" class="layui-textarea" onkeydown="if(event.keyCode==13)return false;">{$row['jfcate_name']}</textarea> <textare 阅读全文

posted @ 2023-03-13 10:17 小馬過河﹎ 阅读(1281) 评论(0) 推荐(0) 编辑

CSS清除浮动三件套
摘要:将样式定义在浮动元素们的父层 .parent::after{ content:""; display:block; clear:both; } 阅读全文

posted @ 2022-09-09 15:13 小馬過河﹎ 阅读(47) 评论(0) 推荐(0) 编辑

CSS单行文本溢出显示…三件套
摘要:p{ width:100px; height:20px; /*三件套*/ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } 阅读全文

posted @ 2022-09-09 15:13 小馬過河﹎ 阅读(34) 评论(0) 推荐(0) 编辑

CSS段落两端对齐 / 长文本自动换行
摘要:Examples 1 p{ text-align: justify; text-justify: inter-ideograph; } Examples 2 p{ word-wrap: break-word; word-break: normal; } 阅读全文

posted @ 2022-09-09 15:12 小馬過河﹎ 阅读(110) 评论(0) 推荐(0) 编辑

flex结合margin:auto定义包含项目居中显示
摘要:margin:auto;在伸缩盒中具有强大的功能,一个定义为“auto”的margin会合并剩余的空间,它可以用来把伸缩项目挤到其它位置。 Examples <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> body{ marg 阅读全文

posted @ 2022-09-09 14:55 小馬過河﹎ 阅读(37) 评论(0) 推荐(0) 编辑

背景图像完全覆盖元素区域
摘要:Examples <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>背景图像完全覆盖元素区域</title> <style> div{ margin:2px; float:left; border:1px solid red; b 阅读全文

posted @ 2022-09-09 14:53 小馬過河﹎ 阅读(18) 评论(0) 推荐(0) 编辑

CSS下拉菜单
摘要:<ul class="nav"> <li><a href="/">首页</a></li> <li class="drop-down"> <a href="javascript:;">出售房源</a> <ul class="drop-down-content"> <li><a href="/Sell" 阅读全文

posted @ 2022-09-09 11:34 小馬過河﹎ 阅读(19) 评论(0) 推荐(0) 编辑

去掉layui table tr hover 效果
摘要:.layui-table tbody tr:hover { background-color: white; } 阅读全文

posted @ 2022-09-09 11:07 小馬過河﹎ 阅读(223) 评论(0) 推荐(0) 编辑

css 中文单行竖排
摘要:.vertical{ width: 20px; margin: 0 auto; line-height: 24px; } 阅读全文

posted @ 2022-09-09 10:59 小馬過河﹎ 阅读(10) 评论(0) 推荐(0) 编辑

div圆角头像
摘要:<div class="avator" style="background: url({:format_person_photo($vo[person_photo],$vo[person_sex])});" ></div> .avator { width: 60px; height: 60px; b 阅读全文

posted @ 2022-09-09 10:53 小馬過河﹎ 阅读(8) 评论(0) 推荐(0) 编辑

css 分隔竖线
摘要:.fly-mid { display: inline-block; height: 10px; width: 1px; margin: 0 10px; vertical-align: middle; background-color: #e2e2e2; } 阅读全文

posted @ 2022-09-09 10:48 小馬過河﹎ 阅读(133) 评论(0) 推荐(0) 编辑

设置不打印区域
摘要:@media Print { .noprint { DISPLAY: none } } 阅读全文

posted @ 2022-09-09 10:47 小馬過河﹎ 阅读(23) 评论(0) 推荐(0) 编辑

H5新标签datalist实现可以输入的select
摘要:HTML <input name="s_key" list="s_key_list"/> <datalist id="s_key_list"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chr 阅读全文

posted @ 2022-09-09 10:25 小馬過河﹎ 阅读(21) 评论(0) 推荐(0) 编辑

fixed
摘要:CSS .mobile{ position:fixed; bottom:20px; right:20px; width:50px; height:50px; background-size:cover; z-index:999; background:darkblue; border-radius: 阅读全文

posted @ 2022-09-09 10:23 小馬過河﹎ 阅读(163) 评论(0) 推荐(0) 编辑

背景图片加表单居中
摘要:body { width: 100%; height: 100vh; background: url('./img/bg.jpg') no-repeat; background-size: cover; background-position: center center; background-a 阅读全文

posted @ 2022-09-09 09:24 小馬過河﹎ 阅读(16) 评论(0) 推荐(0) 编辑

kindeditor使用|自定义工具栏|结合ThinkPHP使用
摘要:链接 官方文档 自用修改版 HTML <textarea name="article_content" id="editor" style="width:100%;height:500px;" >{$row[article_content]}</textarea> <script src="/Pub 阅读全文

posted @ 2022-09-09 09:13 小馬過河﹎ 阅读(77) 评论(0) 推荐(0) 编辑

css选择前/后n个元素
摘要:/* 前3个元素 */ .layui-col-md4:nth-child(-n+3){ border:1px solid red; } /* 后3个元素 */ .layui-col-md4:nth-last-child(-n+3){ border:1px solid red; } 阅读全文

posted @ 2022-09-09 08:59 小馬過河﹎ 阅读(52) 评论(0) 推荐(0) 编辑

scrollbar.css
摘要:/* 根据实际需求,可以不要。 */ body { overflow-y: scroll; } ::-webkit-scrollbar { /*滚动条整体样式*/ width: 6px; /*高宽分别对应横竖滚动条的尺寸*/ height: 6px; } /*定义滚动条轨道 内阴影+圆角*/ ::- 阅读全文

posted @ 2022-09-09 08:39 小馬過河﹎ 阅读(25) 评论(0) 推荐(0) 编辑

html/vue 输出textarea内容换行
摘要:CSS .p{ white-space: pre-line; } Examples <p style="white-space: pre-line;font-size:16px;color:#777;">{{row.ent_profile}}</p> 阅读全文

posted @ 2022-09-09 08:16 小馬過河﹎ 阅读(137) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示