My website features two a
links, and I am utilizing JavaScript to set their href
attributes. When there is no link provided, the color changes to black. However, in Safari on iPhone, achieving the correct color requires the use of -webkit-text-fill-color
. I now need to update the webkit-text-fill-color
property using JavaScript. I attempted
element.style.-webkit-text-fill-color = "color"
, but encountered an error: Uncaught SyntaxError: Unexpected token '-'
. Is there a way to modify it with JavaScript, and if so, what is the correct syntax? Thanks!