使用 :hover 元素的内联样式(使用 HTML/CSS/php)
本文介绍了使用 :hover 元素的内联样式(使用 HTML/CSS/php)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能的重复:
如何嵌入 “a:hover{…}”规则到文档中间的样式属性?
如何在内联CSS中编写a:hover?
我想动态更改元素的悬停颜色,但不使用外部 CSS 样式表,只使用内联.这是代码(使用php生成元素)
I want to dynamically change the hover colour of an element, but not using external CSS stylesheets, only inline. This is the code (using php to generate the element)
当用户将鼠标悬停在该容器元素上时,颜色样式将更改为 $color
的值(此时没有悬停).
When the user hovers over this container element, the color style will change to the value of $color
(at the moment there is no hovering).
任何帮助将不胜感激.
推荐答案
如果 javascript 是可感知的,这将对您有所帮助
This will help you if javascript is appreciable
或
Javascript 在鼠标悬停时更改超链接文本颜色
Javascript Change Hyperlink Text Color Onmouseover
这篇关于使用 :hover 元素的内联样式(使用 HTML/CSS/php)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!