Giter Club home page Giter Club logo

Comments (3)

kazzkiq avatar kazzkiq commented on July 21, 2024 17

@ekatherina there are two ways to break lines in Balloon tooltips:

Option 1: Manually adding line-breaks:

You need to write the code 
 without spaces, and use the attribute data-balloon-break. E.g.

<span data-balloon="Line one &#10; Line two" data-balloon-break>This is a tooltip</span>

Option 2: Using data-balloon-length to break lines automatically:

Additionally you can also let the tooltip break automatically using the length attribute:

<span data-balloon="I'm a big text that don't breaks automatically bla bla bla bla." data-balloon-length="small">This is a tooltip</span>

The values for data-balloon-length are: small, medium, large and fit. You can check examples for length on the website, in "Length" section.

from balloon.css.

iursevla avatar iursevla commented on July 21, 2024 9

If someone is doing this programatically, instead of &#10; use \n and follow the other instructions provided by @kazzkiq

from balloon.css.

gitrajarshi avatar gitrajarshi commented on July 21, 2024 1

I was using balloon.css in EJS
Simply putting attribute as data-balloon-break didn't worked for me (strange) . Setting data-balloon-break="" worked perfectly✔️ with '\n'

from balloon.css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.