Image scaling in style tag?

  • Can someone tell my why when scaling an image with <style> it aliases so badly?

    For example.

    Left image is at 40px native, Right is the same thing but a 240px image with width/height set to 40 in <style>


    That looks horrible.

    Is there a better way to scale this stuff? Can I access these elements through CSS? I don't want to have to figure out the best pixel size for each asset manually.

  • Hi,

    it depends on the browser itself how CSS scalings will be finally rendered. The browsers are working quite differently here.

    What browser and device are you using?
    And what kind of hotspot - a normal one plus scaling/zooming or a distorted one?

    Best regards,
    Klaus

  • Chrome on Desktop for this. I've never had an issue scaling assets with CSS, I just wonder how KRpano is.

    Code
    <style name="info-point" url="assets/images/ui/info-point.png" width="40" height="prop" alpha="0.8"/>
    <hotspot name="intro-jack" style="info-point" zoom="false" ath="-47" atv="1.6"  onclick="showJack" />

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!