Sie sind nicht angemeldet.

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

1

Mittwoch, 22. Juli 2020, 10:20

CSS for HTML Popup

The Popup-blur Html from the examples works fine but I need to add css for the font.
https://krpano.com/releases/1.20.7/viewe…tml5=only+webgl

As far as I can see it as default uses standard sizes for H1-H2.p etc but for some reason the text is white even if there is no color defined anywhere.

I tried this <data name="data_html1" css="data:popupstyle"> which is how it is done in scrolllayers but it does not work

<layer name="spot1" url="images/zoomimage.png" html="HTML" devices="all" scale="0.25" visible="true" keep="true" align="lefttop" x="270" y="520"
onclick="popup('html', get(data[data_html1].content), 520, 660, true);"/>

<data name="data_html1" css="data:popupstyle"><![CDATA[

<div style="padding:15px;">
<img align="left" width="474" height="600" vspace="10" hspace="0" src="textimg/26-11.jpg"/>

<h2><br/>Herluf Trolle, 1516-1565, rigsadmiral<br/></h2>
<p>
Portrættet er en kopi efter et maleri på Herlufsholm fra 1551. Herluf Trolle ejede sammn med hustruen Birgitte Gøye herregården Hillerødsholm, som Frederik II erhvervede i 1560 og gav navnet Frederiksborg. <br/>
</p>
</div>

]]></data>

<data name="popupstyle" devices="all" >
p {
font-family:Verdana;
color:#000000;
font-size: 14px;
font-weight:normal;
line-height:20px;
}
h2 {
color:#000000;
font-family: Palatino;
font-size: 28px;
font-weight: normal;
font-style:normal;
}

</data>

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Mittwoch, 22. Juli 2020, 10:55

The white color is set in here.
»spacerywirtualne« hat folgendes Bild angehängt:
  • Adnotacja 2020-07-22 105413.png
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

3

Mittwoch, 22. Juli 2020, 11:09

The white color is set in here.

Already checked that
This is only the actual SPOTS It does noting for the Html text.

This is what it changes if I change the color to black. Html popup text is still white.
»HansNyb« hat folgendes Bild angehängt:
  • stylespots.jpg

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

4

Mittwoch, 22. Juli 2020, 11:17

I can ad color and fontfamily an size here but thatchanges all the text and it actually increases both paragraf and Headline H2
I need to control with real external CSS settings for individual texts.

<div style="padding:10px;
font-family:Times;
color:#000000;
font-size: 14px;">

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

5

Mittwoch, 22. Juli 2020, 11:21

In this case maybe the main css color is set from the html file
»spacerywirtualne« hat folgendes Bild angehängt:
  • Adnotacja 2020-07-22 112014.png
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

6

Mittwoch, 22. Juli 2020, 11:31

And I tried this without any change,

<data name="data_html1" style="htmltext">

<style name="htmltext"
type="text"
css="color:#000000; font-size:16px; font-weight:bold; text-align:center;"
width="80" height="80"
bgroundedge="42"
bgalpha="0.75"
bgcolor="0x555555"
bgborder="1 0xFFFFFF 1"
bgshadow="0 0 16 0x0 0.5"
txtshadow="0 0 3 0x0 1.0"
mergedalpha="false"
vcenter="true"
oversampling="2"
mipmapping="true"
zoom="true"
capture="false"
/>

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

7

Mittwoch, 22. Juli 2020, 11:51

In this case maybe the main css color is set from the html file


Yes that is how the example works. Have tested it.

But that does not help for popup htmls. It should be set in the xml so that you can control them easy individually.

HansNyb

Profi

  • »HansNyb« ist der Autor dieses Themas

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

8

Mittwoch, 22. Juli 2020, 12:21

OK it works setting it in the index.html file like this

html { height:100%; }
body { height:100%; overflow:hidden; margin:0; padding:0; background-color:#000000; }
h2 { font-family:Palatino; font-size:30px; color:#ffffff; }
p { font-family:Verdana; font-size:14px; color:#000000; }

The problem is to ad devices settings. Mobile needs different fontsizes.