如何让我的下拉列表上有一个边框半径:悬停?

时间:2015-05-11 18:53:58

标签: html css hover

我有一个下拉列表,当您将鼠标悬停在&#39; shop&#39;上时会出现。我希望下拉列表的底部有一个8px的边框半径,它可以工作但不适用于最后一个<li>项,即“存储”字样。我怎样才能解决这个问题?请访问此链接,查看其中的www.me14ch.leedsnewmedia.net/slate

这是代码:

/* drop down list */

#navigation ul {
    list-style: none;
    position: relative;
    width: 100%;
    margin: 0 auto;
    z-index: 2;
}

#navigation ul a {
    display: block;
    color: white;
    text-decoration: none;  
}

#navigation ul li {
    position: relative;
    margin:0;
    padding:0;
    width: 20%;
    display: inline-block;
    list-style-type: none;
    text-align: center;
    margin-left:-10px;
}

#navigation ul li:hover {
background:#6A8F28;
}

#navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left:0;
    background:#A3CC39;
    padding: 0;
    align-content: center;
    width: 100%;
    border-radius: 8px;
}

#navigation ul ul li {
    float: none;
    width: 100%;
    margin-left:0px;
}

#navigation ul ul a {
    line-height: 100%;
    padding: 10px 15px;
}

#navigation ul ul ul {
    top: 0;
    left: 100%;
}

#navigation ul li:hover > ul {
    display: block;
    border-radius:8px;
}

3 个答案:

答案 0 :(得分:0)

使用UIButton<select type="text" name="name" id="name" data-ng-model="formData.state" ng-options="state for state in allState" required > <option value="">Select</option> </select>

.product-location-scroll-container {
  white-space: nowrap;
}
first-child

答案 1 :(得分:0)

这应该可以解决问题 - 试试欢呼

#navigation ul li:last-child a:hover {

    border-bottom-left-radius: 8px;
   border-bottom-left-radius: 8px;
}

答案 2 :(得分:0)

抱歉试试这个 - 应该可行

#navigation ul ul  {

  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow: hidden; /* 1 */

}

/* 1. overflow: hidden is making sure when hover the bottom   will still be  rounded. remove this line and hover on the last item and see */