Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the changing effect of displaying and refreshing tags color words

Shulou Source: shulou.com Published: 2022-06-01 07:35:46 10月02日 Update

This article mainly shows you "how to achieve tags color word display and refresh change effect", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to achieve tags color word display and refresh change effect" this article.

Tags call words, DEDECMS calls the display of tags tag words, refresh a transformation to achieve method CSS+JS file control, simple and easier! ◎ can change as much color as you want.

The advantages of this code:

No need to modify any source files

CSS+JS file control, simple and easy!

Change as much color as you want.

The code for the web page section is as follows:

The code for the HTML section:

Popular label

{dede:loop table='dede_search_keywords' sort='keyword' row='40' if=''} [field:keyword/] {/ dede:loop}

CSS Code:

.tag1 {color:#339900;font-weight:bold;} .tag2 {color:#e65730;} .tag3 {color:#00b9da;} .tag4 {color:#FE3981;font-weight:bold;font-size:14px;}

instructions

There are 4 color changes in this color keyword code, if you want to add more color changes

You only need to modify the var num=4; and css sections and add .tag

For example: var num=5; css to add .tag5 {color:#00b9da;}, of course, you can also modify the corresponding css, change the font color, size, font. Wait, let's do it freely!

The above is all the contents of this article entitled "how to display and refresh tags color words". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Color change code color effect content article part freewheeling font desired file more tag learning help control hot free advantages Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB Redmi Shulou Tech Info Huawei