摘要: 请转: https://www.zhangxinxu.com/wordpress/2015/05/css3-transform-affect/ 阅读全文
posted @ 2020-10-24 22:21 coderLsq 阅读(13) 评论(0) 推荐(0)
摘要: 如题: <style> div { width: 200px; height: 200px; border: 1px solid orange; /* 强制文本在一行内显示 */ white-space: nowrap; /* 超出部分显示省略号 */ text-overflow: ellipsis 阅读全文
posted @ 2020-10-17 17:17 coderLsq 阅读(21) 评论(0) 推荐(0)
摘要: 如题: <style> div { border: 1px solid orange; } img { border: 1px solid skyblue; vertical-align: middle; } </style> </head> <body> <!-- 主要是讲的文字的与图片对齐方式 阅读全文
posted @ 2020-10-17 16:53 coderLsq 阅读(30) 评论(0) 推荐(0)
摘要: 如题,在盒子内使用行内块元素布局的时候,总是会存在几像素的偏差 <style> *{ border: 0; padding: 0; margin: 0; } div{ height: 100px; background-color: orange; } .son{ width: 50%; heigh 阅读全文
posted @ 2020-10-15 22:01 coderLsq 阅读(110) 评论(0) 推荐(0)
摘要: <style> div{ float: left; height: 100px; background-color: orange; } span{ width: 200px; height: 200px; display: block; background-color: skyblue; } < 阅读全文
posted @ 2020-10-14 22:27 coderLsq 阅读(156) 评论(0) 推荐(0)
摘要: 如题:尤其是position <style> div{ width: 100px; height: 100px; background-color: red; background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQAB 阅读全文
posted @ 2020-10-14 22:03 coderLsq 阅读(64) 评论(0) 推荐(0)
摘要: 在css盒子模型中是会存在垂直方向上的外边距塌陷: <style> .father{ width: 200px; height: 200px; background-color: orange; margin-top: 100px; } .son{ width: 100px; height: 100 阅读全文
posted @ 2020-10-14 21:53 coderLsq 阅读(16) 评论(0) 推荐(0)
摘要: 如题: <p> <div>测试文字类块级标签是否能放其他块级标签</div> </p> 页面中确实是显示出来了,如图: 但是我们观察他的html结构时,发现div标签直接在p标签外面了,如图: ,所以我们在使用文字类块级标签的时候,切记不要在在内部再放上其他块级标签,比如<p>,<h1>~<h6> 阅读全文
posted @ 2020-10-14 15:56 coderLsq 阅读(135) 评论(0) 推荐(0)