Issue

I'm using Vue, and there's a space on the screen after the binding. Vanilla JavaScript, like the trim() function of pure JavaScript, is there a way to erase the front and rear margins?
I'll show you the code of the binding process.

Solution
I think what you are experiencing is basic DOM interpretation. When you have a tag spanning multiple line, the browser will render a word space before any text.
This is a good thing most of the times, if you for example have <span> tags in your text, you probably want a space before it.
So i think the solution you are looking for, is simply: Make it 1 line
<!-- This will have spaces -->
<div>
1
</div>
<!-- This will not have spaces -->
<div>2</div>
Answered By - Bjørn Nyborg
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.