简体   繁体   中英

How to Give break in line Javascript and specific color for each?

I want to give break for each line and also give color for specific text.

var popup = new mapboxgl.Popup({ offset: 25 }).setText(
    'Trenza Softwares'
    +
    '1/A New Circular Road (5th Floor) ' +
    'Opposite to Century Arcade Shopping Complex, Moghbazar Wireless ' +
    ' Dhaka-1217 Bangladesh'
);

var popup = new mapboxgl.Popup({offset: 25}).setHTML(

            '<p> <span>Trenza Softwares</span> <br>1/A New Circular Road (5th Floor) <br>Opposite to Century Arcade Shopping Complex, Moghbazar Wireless,<br>Dhaka-1217 Bangladesh</p>'

    
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM