Hi all,
I’m trying to apply some CSS to a button inside an entity’s description property, but nothing I do seems to actually make any difference—the button is still displaying with default styling. Here’s an example of the code. What am I doing wrong?
Thanks,
Adam
CSS:
.storybutton {
background-color: #3498DB;
color: white;
padding: 12px;
font-size: 12px;
border: none;
cursor: pointer;
}
``
HTML:
var story1 = viewer.entities.add({
id: “story1”,
position: Cesium.Cartesian3.fromDegrees(-69.99034, 45.23357),
billboard: {
image: pinBuilder.fromColor(Cesium.Color.BLACK, 48).toDataURL(),
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
10.0,
1e6
),
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
},
viewFrom: new Cesium.Cartesian3(0, 0, 8000)
});
story1.name = “John Hayes: Finishing Strong”;
story1.description =
’
';``