javascript - How to simulate nonstoparagraphing in HTML/CSS? -


Long ago, some videos called "air narration fan" invented an alternative paragraph format: non-cancellation. In this format, when you reach the end of a paragraph, you will reach the top and the knob will fall down one place, but do not move the carriage. As a result 1, the same view was provided about the separation of the paragraph between the paragraphs, but did not waste that place at the end of the line.

  I is preparing a document that uses non-cancellation for the web to make it easy in its current format (word document) is. If it turns into PDF then it also works. But clear solutions (add a bunch of NBSPs at the beginning of the lines) will be broken into a web browser if the user has changed the default font or font size too. Can someone think of ways to get this effect in HTML or CSS more or less reliable? (I'm also ready to use javascript.)    

I quickly I am writing and this is not a complete solution, but someone else can improve my answer:

  p {display: inline; Position: Relative;} P + P {Top: 1em}} P + P + P (Top: 2em;}   

Actually, display paragraphs as inline elements, then Adding an incremental vertical should be switched. Some JavaScript should be able to automate it.

Appendix: According to the comments, we need an account for the following elements < Place all p> elements within code>

Add to CSS:
  p: last-child: after {content: ""; display area; margin-down: 4am;}   

Here, 4em last heading will be equal to paragraph change, plus any additional space you need.

Appendix 2: Another example with more content here:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -