There are 3 blocks in 1 row, for example, like here:
This can be done in bootstrap by creating a row , 3 columns in it, and throwing text into each column (that is, to divide the whole text into 3 equal parts and paste it into the columns). The question arose, is it possible to avoid messing with the division of the text? that is, to create an element that will itself break the inserted whole text into 3 parts and fill in the blocks in the columns of the automatic?
- By means of html / css (and judging by the labels, such a solution is of interest) - no. Scripts - yes. - Pyramidhead
- @Pyramidhead technology has no specific preferences. These tags are indicated to the extent that the example used these technologies and I did not know what could be done with the help of scripts. won't it make it difficult for you to share a source of information, where is such a script described? (is this probably some plugin?) - Iga
- I do not know such plugins. The simplest option is five code lines. - Pyramidhead
- one@Pyramidhead well, you're trolling). Ahem on sabzh - that's right. Using the JS script, you can make the division of the text into 3 parts. The algorithm is simple - we find the length of the text and divide this value by 3. Find an integer and try to divide the text. There we add checks that we do not break the word in parts and then we get 3 pieces of text. Which then are distributed in the necessary pieces of DOM (3 code lines). But this is a "difficult option" and therefore it is no longer 5 lines of code =) - alexoander
- @alexoander now understood. I will try to implement it, if I succeed, I'll post it here. Many thanks for the idea - Iga
|