javascript - How to get rid of space between lines of multiline span? -


for example, jsfiddle: https://jsfiddle.net/qmn8q2ck/

<p>     <span> multiline text. multiline text. </span><span>this multiline text. multiline text. multiline text. multiline text. multiline text. multiline text. multiline text. </span> </p>  span {     background-color: red;     display: inline; } 

enter image description here

however, noticed browser highlighting doesn't have spaces between lines, , has effect like.

enter image description here

how effect?

edited show need display:inline , effecting span elements opposed whole paragraph.

with css line-height property

p { /* or span */    line-height: 90%; /* try values here */ } 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -