-1
之後我有這個導航欄!CSS。刪除懸停並點擊:在
nav {
// border: 1px solid black;
text-align: center;
}
li {
list-style: outside none none;
// list-style: none;
position: relative;
// padding: 10px;
// padding-left: 0;
margin: 15px;
margin-top: 20px;
display: inline-block;
// border: 1px solid black;
// cursor:pointer;
cursor: pointer;
// progress: !important;
}
nav li:not(:last-child):after {
content: '|';
position: absolute;
// display: inline-block;
top: -1px;
right: -18px;
cursor: default;
}
li:hover {
border-bottom: 2px solid rgb(153, 153, 153);
}
<nav>
<ul>
<li class='li'>Chisinau, MD</li>
<li class='li'>Russia, RU</li>
<li class='li'>London, UK</li>
</ul>
</nav>
如何刪除懸停和點擊 :after
說, 「垂直斜槓」 的功能?
這樣https://jsfiddle.net/LeoLion/sthwvt0s/1/ –