摘要:/* 输入框聚焦时不出现边框 */ input:focus{ outline: none; } /* 按钮聚焦时不出现边框 */ button:focus{ outline: 0; }
阅读全文
posted @ 2022-09-26 19:35
随笔 - 33, 文章 - 0, 评论 - 0, 阅读 -
13654
|
|
随笔分类 - CSS
摘要:/* 输入框聚焦时不出现边框 */ input:focus{ outline: none; } /* 按钮聚焦时不出现边框 */ button:focus{ outline: 0; }
阅读全文
posted @ 2022-09-26 19:35
摘要:<style type="text/css"> table{ width: 200px; height: 200px; /* border-collapse:collapse; separate属性值为默认属性值 */ border: 2px solid red; border-collapse:
阅读全文
posted @ 2022-09-21 09:48
摘要:1、每个盒子设定固定的width和height,这个方法是最简单的。 .father{ height:200px; weight:200px; } 2、给外部的父级元素页添加浮动 .father{ float:left; } 3、给父级元素添加overflow属性 其中用到了overflow的hid
阅读全文
posted @ 2022-09-09 16:49
摘要:居中对齐元素 要使块元素(例如 <div> )水平居中,请使用 margin: auto;。 设置元素的宽度将防止其延伸到容器的边缘。 然后,元素将占用指定的宽度,剩余空间将在两个外边距之间平均分配: /*将该块元素居中*/.center { margin: auto; width: 50%; bo
阅读全文
posted @ 2022-09-09 16:08
摘要:选择器是选取需设置样式的元素的模式。 选择器例子例子描述 .class .intro 选择 class="intro" 的所有元素。 .class1.class2 .name1.name2 选择 class 属性中同时有 name1 和 name2 的所有元素。 .class1 .class2 .n
阅读全文
posted @ 2022-09-09 10:54
|
|