javascript - Columns with line-numbers by column-count -
hello,
i've created view css3 "column-count"-property without line numbers. works fine, question how possible add line-numbers such view.
it seems not possible css only.
what solution achieve this?
looking @ question , no code shared - exact answer can not given , time consuming.
here can try for
- count total number of character in textual content - paragraph
- you need define how many columns text devided into
- number of characters or letters each line contain. (this include every character such alpha-numeric + special + blank space)
- you can write js count number of characters , print counter value after reaching limit each line.
- in way js print line number based on number characters.
example
- consider textual content contains 1000 characters
- consider each line of column contain 25 characters
- which further means have 40 lines (1000/25) of text.
- consider there 4 columns
- which further means each column have 10 lines
- you need consider \n explicitly consider end of line.
- once know number lines can run loops , line along row-numbers.
Comments
Post a Comment