摘要:
实例 使用 calc() 函数计算 <div> 元素的宽度: #div1 { position: absolute; left: 50px; width: calc(100% - 100px); border: 1px solid black; background-color: yellow; p 阅读全文
摘要:
CSS 语法 filter: none | blur() | brightness() | contrast() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia() | 阅读全文
摘要:
语法 box-sizing: content-box|border-box|inherit: 值说明 content-box 这是 CSS2.1 指定的宽度和高度的行为。指定元素的宽度和高度(最小/最大属性)适用于box的宽度和高度。元素的填充和边框布局和绘制指定宽度和高度除外 border-box 阅读全文
摘要:
实例 1 奇数和偶数是可以作为关键字使用用于相匹配的子元素,其索引是奇数或偶数(该索引的第一个子节点是1)。 在这里,我们为奇数和偶数p元素指定两个不同的背景颜色: p:nth-child(odd) { background:#ff0000; } p:nth-child(even) { backgr 阅读全文
摘要:
类选择器和属性选择器,伪类选择器 权重都是10 input[type="text"]{ width:150px;} 选择器示例示例说明CSS .class .intro 选择所有class="intro"的元素 1 #id #firstname 选择所有id="firstname"的元素 1 * * 阅读全文
摘要:
属性 属性值描述 accept audio/* video/* image/* MIME_type 规定通过文件上传来提交的文件的类型。 (只针对type="file") align left right top middle bottom HTML5已废弃,不赞成使用。规定图像输入的对齐方式。 ( 阅读全文
摘要:
带有两种不同输入类型的 HTML 表单,text 和 submit: <form action="demo-form.php"> 用户名: <input type="text" name="usrname"><br> <input type="submit" value="提交"> HTML 4.0 阅读全文
摘要:
实例 <audio controls> <source src="horse.mp3" type="audio/mpeg"> <source src="horse.ogg" type="audio/ogg"> Your browser does not support this audio form 阅读全文
摘要:
使用 HTML5 <video> 元素 HTML5 <video> 标签定义了一个视频或者影片. <video> 元素在所有现代浏览器中都支持。 以下 HTML 片段会显示一段嵌入网页的 ogg、mp4 或 webm 格式的视频: 实例 <video width="320" height="240" 阅读全文
摘要:
阅读全文
摘要:
1,只保留右边的边框有颜色; border-left: transparent red transparent transparent; 2,样式都是solid border-style:solid; 3,上边框宽度要大,右边框宽度稍小,其余边框为0 border-width:100px 50px 阅读全文
摘要:
只需要添加 ·1,margin-left:-1px; 2,如果盒子没有定位,则鼠标经过添加相对定位即可; position:relative; 如果都有定位,则利用z-index提高层级; z-index:1; 阅读全文