[英]Make current page on menu appear with different colour
Using html, css and a DW template, how do I make the font colour of the link for my current page in my menu appear with a separate colour than the other page links?使用 html、css 和 DW 模板,如何使菜单中当前页面的链接的字体颜色显示为与其他页面链接不同的颜色? I don't know JavaScript etc.
我不知道 JavaScript 等。
function changecolor(colorhere){ var x=document.getElementById("text"); x.style="color:"+colorhere; }
<p id="text"> Some and so on text here </p><br> <button onclick='changecolor("red")'>Red</button> <button onclick='changecolor("blue")'>Blue</button> <button onclick='changecolor("yellow")'>Yellow</button>
Change color using javascript!使用javascript更改颜色!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.