Home > CMS Tutorial > Empire CMS > How to use js+css to achieve the highlight effect of the current column in Empire CMS

How to use js+css to achieve the highlight effect of the current column in Empire CMS

silencement
Release: 2019-11-26 14:15:21
forward
1863 people have browsed it

How to use js+css to achieve the highlight effect of the current column in Empire CMS

The solution for empire cms to use js css to achieve the highlight effect of the current column is as follows:

1. Add the following code to the template page:

code The code is as follows:

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

2.js part of the code is as follows:

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:

The code is as follows :

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

Users can also adjust the css style according to their own preferences to achieve satisfactory results!

Recommended to study "Empire cms tutorial"

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

Related labels:
css
source:www.word666.com
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