1

是否可以通过仅使用 HTML/css 使单击的链接文本变为粗体?

<body>
    <div id="menu-bg">
        <div id="menu-text">
            <ul id="list">
                <li><a href="experience.php">THE EXPERIENCE</a><br>
                    <a href="services.php">SERVICES</a><br>
                    <a href="adventures.php">ADVENTURE</a><br>
                    <a href="tour.php">TOUR</a><br>
                    <a href="gallery.php">GALLERY</a><br>
                    <a href="reviews.php">REVIEWS</a><br>
                    <a href="location.php">LOCATION</a>
                </li>

         </ul>
      </div>
    </div>
</body>
4

3 回答 3

10

尝试

a:visited {
font-weight:bold;
}
于 2013-03-03T13:22:17.020 回答
2

Definitely Yes.

For html/css, you can use:

<style>
    li a:active{
        font-weight:bold;
    }
</style>

You can also use javascript/jquery on that:

$('li a').click(function(e){
    $(this).css('font-weight','bold');
})
于 2013-03-03T13:27:13.113 回答
1

You may try -

<style>
ul li a:visited {
     font-weight:bold;
}
</style>

write me if problem persists.

于 2013-03-03T13:26:23.423 回答