baidu120 - html/css
type: channel
link: http://blog.baidu120.cc/category/html-css
description: html/css notes
items: css ui
items: ThinkAdmin 常用代码
items: h5开发bug修复记录
items: 常用css
items: 前端常用代码

css ui
type: item
date: 2023-09-23T14:21:50+08:00
description: css ui/** 初始化 **/ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,textarea,p,blockquote,th,td,form,pre{margin: 0; padding: 0; -webkit-tap-highlight-color:rgba(0,0,0,0);} a:active,a:hover{outline:0} img{display: inline-block; border: none; vertical-align: middle;} li{list-style:none;} table{border-collapse: collapse; border-spacing: 0;} h1,h2,h3,h4{font-weight: 700;} h5,h6{font-weight: 500; font-size: 100%;} button,input,select,textarea{font-size: 100%; } input,button,textarea,select,optgroup,option{font-family: inherit; font-size: inherit; font-style: inherit; font-weight: inherit; outline: 0;} pre{white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;} /** 初始化全局标签 **/ body{line-height: 1.6; color: #333; color: rgba(0,0,0,.85); font: 14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;} hr{height: 0; line-height: 0; margin: 10px 0; padding: 0; border: none!important; border-bottom: 1px solid #eee !important; clear: both; overflow: hidden; background: none;} a{color: #333; text-decoration:none;} a:hover{color: #777;} a cite{font-style: normal; *cursor:pointer;} /** 基础通用 **/ .border-box, .border-box *{box-sizing: border-box;} /* 消除第三方ui可能造成的冲突 */.box, .box *{box-sizing: content-box;} .clear{clear: both; *zoom: 1;} .clear:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;} .clear-space{word-spacing: -5px;} .inline{position: relative; display: inline-block; *display:inline; *zoom:1; vertical-align: middle;} /* 三角形 */.edge{position: relative; display: inline-block; vertical-align: middle; width: 0; height: 0; border-width: 6px; border-style: dashed; border-color: transparent; overflow: hidden;} .edge-top{top: -4px; border-bottom-color: #999; border-bottom-style: solid;} .edge-right{border-left-color: #999; border-left-style: solid;} .edge-bottom{top: 2px; border-top-color: #999; border-top-style: solid;} .edge-left{border-right-color: #999; border-right-style: sol…

ThinkAdmin 常用代码
type: item
date: 2022-01-13T10:57:00+08:00
description: 数据列表操作启用、禁用 禁 用 激 活 多选表格头 表格行 排序表头 刷 新 表行 url()}" data-loading="false" data-value="id#{$vo.id};action#sort;sort#{value}" value="{$vo.sort}"> 爬虫 标题:{{=d.title}} 链接:{{=d.href}} 操作:删除 angluar操作例子 序号 是否正确 答案内容 添加 正确 错误 保存数据 取消编辑

h5开发bug修复记录
type: item
date: 2020-02-19T20:04:00+08:00
description: FormData XMLHttpRequest Level 2 新增的一个对象，利用它来提交表单、模拟表单提交，当然最大的优势就是可以上传二进制文件! var form = document.getElementById("form"), formData = new FormData(form); /** * formData.get(name: string) * * 返回第一个属性为 name 的 值 || null */ /** * formData.getAll(name: string) * * 获取所有属性名为 name 的值，以 数组 || [] 形式返回 */ /** * （同步操作） * formData.append(name: string, value: string|Blob, fileName: string) * * 可添加多个同名的值，不会覆盖，非唯一性 */ formData.append("username", "jackie"); console.log("formData:", formData, "get:", formData.get("username"), "getAll:", formData.getAll("username")); /** * （同步操作） * formData.set(name: string, value: string|Blob, fileName: string) * * 有该属性则修改，无则添加该属性及值 * 会将 name 属性的值全部改为 value，且 getAll 会返回 仅包含一个该value值 的数组 */ formData.set("username", "setted-name"); console.log("formData:", formData, "get:", formData.get("username"), "getAll:", formData.getAll("username")); /** * has(name: string): Boolean */ console.log("has:", formData.has("username"), formData.has("has-attr")); /** * delete(name: string) * * 删除所有 name 属性 */ formData.delete("username") console.log("deleted-has:", formData.has("username"), formData.get("username"), formData.getAll("username")); // ************************************************************************************************************************ ### 多图上传 // 通过 $.each($input[0].files, function (index, file) { formData.append("file" + index, file); }); $.ajax({ // ... // 直接将 formData 对象传递给后台 data: formData, }) Base64、Blob、File 之间的相互转换 // 1、file、blob 转换为 base64 function fileOrBlobToBase64 (fileOrBlob, callback) { var reader = new FileReader(); reader.readAsDataURL(fileOrBlob); reader.onload = function(evt) { console.log(reader.result, this.result, evt.target.result); //获取到base64格式图片 // callback(result); }; } // 2、base64 转换为 blob function base64ToBlob(base64Data) { //console.log(base64Data);//data:image/png;base64, var byteString; if(base64Data.split(',')[0].indexOf('base64') >= 0) byteString = atob(base64Data.split(',')[1]);//base64 解码 else{ byteString =…

常用css
type: item
date: 2018-09-22T13:14:00+08:00
description: resethtml, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, menu, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, main, menu, nav, output, ruby, section, summary, time, mark, audio, video {margin: 0;padding: 0;border: 0;font-size: 100%;font: inherit;vertical-align: baseline;} article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section {display: block;} *[hidden] {display: none;} body {line-height: 1;} menu, ol, ul {list-style: none;} blockquote, q {quotes: none;} blockquote:before, blockquote:after, q:before, q:after {content: none;} table {border-collapse: collapse;border-spacing: 0;} .clearfix:after, .clearfix:before{content: " ";display: table;} .clearfix:after{clear: both;} .center-block{display: block;margin-left: auto;margin-right: auto;} .right{float: right!important;} .left{float: left!important;} .hide{display: none!important;} .show{display: block!important;} .invisible{visibility: hidden;} .text-hide{color: transparent;text-shadow: none;background-color: transparent;border: 0;} .hidden{display: none!important;} .fixed{position: fixed;} .font-s12{font-size: 12px!important} .font-s13{font-size: 13px!important} .font-s14{font-size: 14px!important;} .font-s16{font-size: 16px!important;} .font-s18{font-size: 18px!important;} .font-s20{font-size: 20px!important;} .border-none{border: none!important;} .border-radius-none{border-radius: 0!important;} .line-height-18{line-height: 18px!important;} .padding-none{padding: 0!important;} .padding-5{padding: 5px!important} .padding-10{padding: 10px!important} .padding-15{padding: 15px!important} .padding-20{padding: 20px!important} .padding-25{padding: 25px!important} .pad…

前端常用代码
type: item
date: 2017-07-29T12:45:00+08:00
description: css常用组件公共reset.txt栅格grid.txt按钮button.txt手机端布局统一media.txt排版文件typography.txtjs常用js函数ajax示例操作十分钟玩转 jQuery、实例大全Javascript函数的几种写法pcm手机端自适应.txt