Href bull - 没有出现

时间:2014-08-26 14:58:42

标签: css css-position

<div id="map" class="cf">
    <a href="#" class="bull washdc"></a>
</div> <!-- /#map -->


#map a.bull{
    position: absolute;
    z-index: 999;
    width: 6px;
    height: 6px;
    color:red;
    border-radius: 50%;
}

#map a.washdc{
    top:10px;
    left:100px;
}

我无法显示此链接。我设置了宽度和高度,但没有出现红色背景。

2 个答案:

答案 0 :(得分:0)

你的.bull锚没有任何内容或背景,所以它不会向你显示任何内容,因为没有什么可看的..尝试这个..看到它正常工作here

#map a.bull{
  position: absolute;
  z-index: 999;
  width: 6px;
  height: 6px;
  color:red;
  border-radius: 50%;
  background:red;
}

答案 1 :(得分:0)

在CSS中,&#39; color&#39; -attribute 指定文本的颜色。

由于你没有任何文字,因此不会有任何文字变成红色。 在您的情况下,您应该添加&#39;背景颜色&#39; 以显示某些内容。