html - 在 css/html 中创建人气栏

标签 html css

<分区>


我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。

关闭 7 年前

我正在尝试制作一个像 Spotify 那样的人气栏

enter image description here

任何人都知道任何好的教程(一直找不到)。或者有任何自己的代码构建?

最佳答案

这是一个纯 HTML 和 CSS 的解决方案。您也可以使用 SVG 执行此操作。

http://codepen.io/tylerism/pen/xGpQwQ

HTML

<div class="pop_line active">

</div>
<div class="pop_line active">

</div>
<div class="pop_line active">

</div>
<div class="pop_line">

</div>
<div class="pop_line">

</div>

CSS

.pop_line{
  background:#444;
  border-radius:3px;
  width:5px;
  height:20px;
  float:left;
  margin:2px;
}
.pop_line.active{
  background:#999;

}
html{
  background:#111;
}

关于html - 在 css/html 中创建人气栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31124022/

上一篇:html - bootstrap 减少行间距

下一篇:html - 使用视口(viewport)高度在父级内部垂直居中 div

相关文章:

html - 你如何将元素放在新行上,与 css-grid 相同的列?

css - 这个符号在 CSS 中是什么意思?

jquery - Material 设计精简版(MDL)中的水平和垂直中心卡

html - 滚动条未显示在高度为 :30px 的文本区域中

javascript - 使用javascript自动打开页面

html - 使用 calc() 的 Div 间距偏移

css - 我应该使用 margin 0 auto 还是 position, top, left 来将内容居中对齐

javascript - 单击 meteor 更改 css 背景颜色

html - 在div中定位表头

javascript - 是否可以在 jQuery mmenu 中打开子菜单?