Change background, color and font of anchors

05 August 2016 11:55
Is it possible change the style of anchors with css directly in the html file?

05 August 2016 17:03
Is it possible change the style of anchors with css directly in the html file?
In theory, yes, you can edit the HTML. In practice you better use custom anchors (requires some coding though).
The Founder | Twitter | Facebook | Linkedin
07 August 2016 20:13
How i can edit html?
I tried to modify html and i insert a css style with id, but i didn't see nothing change in the style of anchors!
Have you an example?

08 August 2016 16:23
There is an official hack which allows to modify CSS rules for anchors
The Founder | Twitter | Facebook | Linkedin
09 August 2016 16:37
Ok, great!

22 October 2016 11:23

Yuri, you mentioned that the best way to change the anchor style is to use custom anchors.

I'm working on a custom app (without webplayer) and wanted to to add anchors for all the selectable objects but in this case I cannot really use the custom anchors. If I got it right, you must add the custom anchors before loading the 3D model data, which means that there's not yet any information about the selectable objects. The generic anchors, however, should be created after loading the 3D model and have the selectable objects available and this suits me better.

Based on your custom anchor example, I managed to get the generic ones work ok, and even change the appearance with the css-style code lines. It would be much better if these css-style settings were located within the (main) css file so I tried that and couldn't make it work. Is it even supposed to work, or is it still on your TODO list perhaps?

Edit: It seems that you cannot change the appearance of the achors quite as freely in javascript as you would by using css. I'm really curious now, how did you do it with your dairy plant app?

Cheers, Harri
23 October 2016 14:04
As to the previous comment, I actually figured out the latter part and the solution looks pretty nice. However, the css part, i.e. the style definitions being in a css file, that's still something that doesn't seem to work. Any ideas for that?

Cheers, Harri
24 October 2016 11:50
Hi Harri,

As far as I know, declaring anchor styles in the main css file should work. Please make sure your css declarations are properly assigned/referenced etc.
The Founder | Twitter | Facebook | Linkedin
24 October 2016 22:58
Hi Yuri,

Indeed it does work! It took me a while to get everything sorted but now it works perfectly, just the way I wanted, with the anchor style stuff hidden away in the css file instead of the javascript code. Whehey!

Cheers, Harri
Please register or log in to leave a reply.