html - 下拉列表中的三 Angular 点显示不正确

标签 html css

我希望三 Angular 形指针在父菜单和下拉菜单之间留出足够的空间。

我想要的是如下:
enter image description here 我所做的如下:

enter image description here

三 Angular 形的 CSS

 .sf-menu ul li:first-child a:after {
    content: '';
    position: absolute;
    left: 40px;
    top:-0.01px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #072438;


}

js fiddle :

http://jsfiddle.net/2athcwe9/

最佳答案

你只需要调整 ul 和箭头上的 top 值:

.sf-menu ul li:first-child a:after {
  content: '';
  position: absolute;
  left: 40px;
  top:-10px; <-------
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #072438;     
}

.sf-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;    
  display: none;
  position: absolute;
  top: 63px; <---------------------
  left: 0;
  z-index: 99999;    
  background-color: #2D2D2D;   
  border-bottom:none;
  /* background-image: linear-gradient(#444, #111);   */ 
  /*-moz-border-radius: 5px;*/
  /*border-radius: 5px;*/    
}

FIDDLE

关于html - 下拉列表中的三 Angular 点显示不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27736712/

相关文章:

html - CSS 变换属性 Safari

javascript - JQuery 父子选择

javascript - 如何仅使用 Javascript 降低平滑滚动的默认速度?

Javascript单选按钮在选择一个单选按钮时取消选择其他单选按钮?

asp.net-mvc - 验证(HTML5) : Element 'T' is not supported

css - 不将 css 应用于动态 html 菜单

css - <ul> Sprite 问题

html - 位置为 :fixed 的子导航菜单

css - 如何使用 CSS + HTML 在对话行中排除前导连字符?

javascript - 具有多个字段和 "display"属性的 CSS 选择器