博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
css解决内联元素间的空白间隔
阅读量:6688 次
发布时间:2019-06-25

本文共 573 字,大约阅读时间需要 1 分钟。

在内联元素的父级元素上设置font-size: 0px;即可。例如:

  • 1
  • 2
  • 3
  • 4
*{ margin:0; padding:0;}html, body { width: 100%; height: 100%;}ul li { list-style: none;}.wrap { width: 600px; margin: 0 auto; margin-top: 100px;}.wrap ul { font-size: 0px;}.wrap li { width: 25%; height: 150px; display: inline-block;}.part1 { background: red;}.part2 { background: green;}.part3 { background: pink;}.part4 { background: tomato;}

转载于:https://www.cnblogs.com/sunshine21/p/10692205.html

你可能感兴趣的文章
MySQL主从配置
查看>>
8.6 管道符和作业控制
查看>>
java实现的web网络书店
查看>>
深入理解Plasma(四):Plasma Cash
查看>>
Shell脚本介绍(资源)
查看>>
SpringCloud SpringBoot 分布式微服务云架构 构建RESTful API
查看>>
查询改写参数配置
查看>>
Kubernetes 网络改进的三项实践分享
查看>>
SpringMVC的粗略整理(一)
查看>>
Visual Paradigm 教程[企业架构]:如何绘制ArchiMate图?
查看>>
Git 提交的正确姿势:Commit message 编写指南
查看>>
分享HTML5自动化构建工具gulp使用方法步骤
查看>>
PHP 包含文件
查看>>
BootStrap 资源汇总
查看>>
为Empathy增加QQ支持
查看>>
Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit:
查看>>
rabbitmq的使用笔记
查看>>
QT临时笔记
查看>>
一次、二次、三次指数平滑计算思想及代码
查看>>
TIDB 最佳实践
查看>>