【问题标题】:Trying to make tags look consitent in a tag cloud尝试使标签在标签云中看起来一致
【发布时间】:2014-03-11 12:23:27
【问题描述】:

我正在努力实现这一目标:http://prntscr.com/2zurxz 但到目前为止能够做到这一点:http://prntscr.com/2zus2j

有任何 CSS、Javascript 专家可以提供帮助吗?

HTML/CSS 代码在那里:JSFiddle

谢谢!

HTML:

<div class="block tags">
    <a href="#">sportcards</a>
    <a href="#">atari</a>
    ...
</div>

CSS

.block {
    float: left;
    margin-bottom: 15px;
    border: 1px #e3e3e3 solid;
    background: #fcfcfc;
    width: 208px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px; 
}

.tags {
    border: none;
    border-radius: 0px;
    background: none;
}

.tags a {
    display: inline-block;
    font-family: Georgia, Times, "Times New Roman", serif;
    font-size: 12px;
    font-style: italic;
    color: #107ea1;
    background: #e0f4fb;
    padding: 7px 13px 6px 12px;
    margin-bottom: 4px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
}

.tags a:hover {
    background: #9bdaee;
}

【问题讨论】:

  • 任何 HTML、CSS 和/或 JS?
  • 我可以在哪里以及如何在此处发布代码?
  • @MrQj 编辑您的问题。将其粘贴到您的问题中。

标签: javascript jquery html css tags


【解决方案1】:

要完美匹配它们,您需要 javascript。

看看jQuery Masonry plugin

编辑:

该链接由于某种原因无法加载示例.. 试试this

【讨论】:

  • 已尝试但未按预期工作。与我使用 css 时的外观几乎相同。
猜你喜欢
  • 2016-05-04
  • 1970-01-01
  • 2021-05-01
  • 1970-01-01
  • 2013-07-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多