Add a transparent background to a feature tooltip

Add a transparent background to a feature tooltip

elliott.rosenfeld
Autodesk Autodesk
2,543 Views
3 Replies
Message 1 of 4

Add a transparent background to a feature tooltip

elliott.rosenfeld
Autodesk
Autodesk

The trick is to declare the background color and opacity attributes within the initial tooltip opening tag.

 

1) Exit Edit Mode if you are in edit mode.

2) Select the desired feature.

3) Right-click and choose Edit Tooltip

edit_tooltip.jpg

4) Select the HTML tab

HTML_tooltip.jpg

 

For example:

 

<tooltip background-color=”#fff” opacity=”.5”>

<style>

</style>

</tooltip>

 

Will provide you with a white background that has 50% opacity. Set opacity to a lower value (minimum=0, maximum=1) to increase transparency.

 

transparent_tootip_background.jpg

 

From there, you can add any number of items to your tooltip, such as embedding a YouTube video or Screencast, adding a hyperlink or iframe, or even a "Show in Google Maps" link.

 

Check out these additional help resources to extend your tooltip capabilties: 

 


Principal Specialist, Infrastructure
2,544 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Thanks,

 

One question: When using this code, not only the background becomes transparent, but also the text. Is it possible to make the background transparent without affecting the font/text? 🙂

0 Likes
Message 3 of 4

elliott.rosenfeld
Autodesk
Autodesk

Hi there, sorry for the delayed response. That's a good question, I will have to test some HTML/CSS and see what I can find out. I'll report back shortly.

 

Thanks,

Elliott


Principal Specialist, Infrastructure
0 Likes
Message 4 of 4

elliott.rosenfeld
Autodesk
Autodesk

@Anonymous After looking into this further, I do not believe it is currently possible to apply opacity only to the background, although I would suggest playing around with the css/qss styles to see if you can come up with a solution. to my knowledge, these are special elements that will work in the feature tooltip HTML editor to format the tooltip container.

 

  • radius: The corner radius of the tooltip.
  • opacity: The general opacity of the tooltip.
  • style: The style (css/qss) used to stylize the tooltip widget.
  • forcewebview: For simple tooltip content there is no web view used. The advantage is, that the size of the tooltip gets adjusted automatically. Nevertheless, sometimes not all html elements or styling are visualized correctly in this case. Then it might be necessary to force the use of the web view by setting this property to true.

Thanks,

Elliott


Principal Specialist, Infrastructure
0 Likes