如何让每个单独的标签都有自己的子标签集?

时间:2020-06-22 23:32:55

标签: html css

如果您还有其他提示或工具可以帮助我,我希望MTH025-ENG111仅在将鼠标悬停在其上时才可见。

<html>
   <head>
      <title> follow the cult </title>
   </head>
   <body> 
   </body>
   <h1 style="text-align:center"> CULT </h1>
   <br></br>
   <hr>
   </hr>
   <div style="text-align:center">
      <input type="button": value="men" 
      button onclick= 
      <ul style="list-style-type:dark circle">
         <li> MTH 025 </li>
         <li> JPN 101 </li>
         <li> CSE 102 </li>
         <li> CEC 101 </li>
         <li> ENG 111 </li>
      </ul>
      <input type="button": value="women">
      <input type="button": value= "new arrivals">
      <input type="button": value="popular" >
   </div>
</html>

1 个答案:

答案 0 :(得分:0)

将li元素的不透明度设置为0,然后将鼠标悬停在其上,使其变为1

尝试:


<html>

<head>
    <title> follow the cult </title>

    <style>
        .ul li {
            opacity: 0;
        }

        .ul li:hover {
            opacity: 1;
        }

    </style>

</head>

<body>
</body>
<h1 style="text-align:center"> CULT </h1>
<br></br>
<hr>
</hr>
<div style="text-align:center">
    <input type="button" : value="men">
    <ul class="ul" style="list-style-type:dark circle">
        <li> MTH 025 </li>
        <li> JPN 101 </li>
        <li> CSE 102 </li>
        <li> CEC 101 </li>
        <li> ENG 111 </li>
    </ul>
    <input type="button" : value="women">
    <input type="button" : value="new arrivals">
    <input type="button" : value="popular">

</div>