Home > CMS Tutorial > Empire CMS > How to achieve the current column highlighting effect in Empire CMS

How to achieve the current column highlighting effect in Empire CMS

angryTom
Release: 2019-11-15 14:06:20
Original
2304 people have browsed it

How to achieve the current column highlighting effect in Empire CMS

How to achieve the highlight effect of the current column in empire cms

You can use js css to achieve the highlight effect of the current column To achieve this, the specific steps are as follows:

1. Add the following code to the template page:

<li><a id="nav_[!--id--]" href="[!--class.url--]#">link</a></li>
Copy after login

2. The js part of the code is as follows:

<script>
var cur_nav = document.getElementById("nav_" + [!--self.id--]);
cur_nav.className = "cur";
</script>
Copy after login

3.css part of the code is as follows:

<style>
    #nav ul li a.cur {
        color:#FFF;
        background:#000;
    }
</style>
Copy after login

The above css indicates that the font of the current column is white and the background is black. Users can adjust the css style according to their own preferences to achieve satisfactory results!

Recommended tutorial: Empire CMS Tutorial

The above is the detailed content of How to achieve the current column highlighting effect in Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template