html - 同一行中带有图标的更多文本

标签 html css

<分区>


想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post .

关闭 7 年前

我需要更多文本和图标与 html 和 css 在同一行,
我需要 something like this .

这是页面:https://app.box.com/s/xpy18er6dyz5cm9jf4b01fa4jof7cxwx (必须下载)
怎么做?

最佳答案

我认为这是您正在寻找的东西。它对你有反应,所以你可以有点灵活。我在 css 中创建了一个圆圈,但您可以轻松地用图像将其切换或自己将其放入圆圈中。

https://jsfiddle.net/7r6gL7hc/

<div class="container">
  <div class="column">
    <div class="circle"></div>
    <div class="title">Title</div>
    <div class="description"> This is where you would put a description</div>
  </div>
  <div class="column">
    <div class="circle"></div>
    <div class="title">Title</div>
    <div class="description"> This is where you would put a description</div>
  </div>
  <div class="column">
    <div class="circle"></div>
    <div class="title">Title</div>
    <div class="description"> This is where you would put a description</div>
  </div>
  <div class="column">
    <div class="circle"></div>
    <div class="title">Title</div>
    <div class="description"> This is where you would put a description</div>
  </div>
</div>

CSS:

.container { max-width:800px; margin: 0 auto;}

.column { width: 25%; text-align: center; float: left;}

.circle { background: red; border: black 6px solid; border-radius: 50%; width: 150px; height: 150px; color: black; margin: 0 auto;}

.title { text-align: center; width:100%; font-size: 30px; padding: 10px 0; text-decoration: underline; text-transform: uppercase;}

.description { text-align: center; width: 100%; max-width: 100px; margin: 0 auto;}

关于html - 同一行中带有图标的更多文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34073806/

上一篇:html - 溢出与显示内联一起工作

下一篇:html - 将 div 定位在固定位置 div 下方

相关文章:

html - 媒体查询无响应

c# - 从字符串中删除脚本和链接标签

javascript - 固定可滚动 div 内的 anchor

javascript - 从服务器获取数据的有效方法

javascript - 图片导航栏

css - Bootstrap 4.1.1 CSS 轮播 slider 箭头对齐

html - 50 像素的边框半径在 Firefox 中看起来有裂痕

javascript - 从 JavaScript 访问 DOM 元素并向其发送事件

html - 如何垂直对齐左右两个div?

jquery - 使 div 在 Jquery getJson() 回调函数上可见