gpt4 book ai didi

html - 用于更改刚刚单击的标签外观的 CSS 代码

转载 作者:太空宇宙 更新时间:2023-11-04 12:30:30 28 4
gpt4 key购买 nike

My desired output after I click on a particular option嗨,我不太擅长 CSS。我想创建一个页面,在单击菜单选项后,该选项的边框底部变为蓝色。我当前的代码适用于鼠标悬停和事件,但在我离开鼠标后不起作用。CSS 代码:

body
{
background-image: url("images/temp1.jpg");
background-size: 100% 100%;
background-attachment: fixed;
}

.container
{
text-align: center;
}

.center_div
{
margin-left: 12%;
width: 75%;
height: 100%;
background-color: #ffffff;
}
td.mainmenu
{
border-style: hidden;
width: 15%;
height: 10%;
border-collapse: separate;
border-spacing: 3%;
padding:20px;
padding-left:60px;
}
a.mainmenu
{
text-decoration:none;
color: black;
}
td.mainmenu:hover
{
border-bottom-style:solid;
border-bottom-color:blue;

}

HTML代码:

<html>
<head>
<link rel="stylesheet" href="admin_template.css">
</head>
<body>
<div class="container">
<div class="center_div">
<table class="mainmenu">
<tr>
<td class='mainmenu'><a class='mainmenu' href="">Sales</a></td>
<td class='mainmenu'><a class='mainmenu' href='out_of_stocks.php'>Out of Stocks</a></td>
<td class='mainmenu'><a class='mainmenu' href='refill_stock.php'>Refill Stocks</a></td>
<td class='mainmenu'><a class='mainmenu' href='enter_product.php'>New products</a></td>
<td class='mainmenu'><a class='mainmenu' href='admin_so.php'>Sign Out</a></td>
</tr>
<table>
<hr/>
</div>
</div>
</body>
</html>

`

最佳答案

关于html - 用于更改刚刚单击的标签外观的 CSS 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27696075/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com