App下載
首頁(yè)htmlui_olHTML Element Style - 如何在懸停時(shí)向li項(xiàng)添加邊框

HTML Element Style - 如何在懸停時(shí)向li項(xiàng)添加邊框

我們想知道如何在懸停時(shí)向li項(xiàng)添加邊框。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
li {
  diplay: block;
  float: left;
  margin: 5px;
  padding: 6px;
}

li:hover {
  padding: 5px;
  border: 1px solid #000000;
}
</style>
</head>
<body>
  <ul>
    <li>One button</li>
    <li>Two buttons</li>
    <li>Three buttons!</li>
  </ul>
</body>
</html>