Home > front end >  Sinking method of acronym HTML paragraph
Sinking method of acronym HTML paragraph

Time:10-11

We often encountered when using the word need to make the paragraph 2 sinks, so, on a web page how to implement paragraphs 2 through CSS also sink? We in the web site of the construction of the project, often can see a text display of special effects: 2 sinks, so small make up take a few minutes to think about using the method of measuring brain, and knocked code and write out to share with everyone, besides provides the basic problem solving method, here also write my thinking process and the other two possible can use the method of thinking,
Renderings are as follows:

Paragraph 2 sinking method:
1, before the pseudo elements achieve
2, using the tag
control3, the first - letter
Paragraph 2 sinking method analysis:
First method decisively abandoned, the reason is that transfer the data clearly from the background, and then what will pass at this time we can not determine the background data, and the third way is abandoned, the reason is that cannot be achieved a word corresponding to two rows phenomenon, according to the second method, the following thinking:
Three label (" alone "is a label on the left, the right side of the two lines of a label, two lines below the normal text a label) - decisive part with this kind of writing method, the reason is that for Taiwan before and after data interaction was too much trouble, to maintain very inconvenient,
Use two labels, and floating against the first label, use of the nature of the floating - believe that with the floating people think of the basic characteristic of the floating element -- forget it, you can view the article "what is the nature of the floating element", you can look at the second example, here, for the background data, using the string interception, place the words in the two kinds of labels, can use JS interception, may also directly when get to intercept (background)
Paragraph 2 sinks code implementation case:



<meta charset="UTF-8">
Walk alone ice & lt;/title> <br/><style> <br/>. Wrap span {<br/>float: left; <br/>Width: 40 px; <br/>height: 40px; <br/>text-align: center; <br/>The line - height: 40 px; <br/>The font - size: 32 px; <br/>font-weight: bold; <br/>} <br/></style> <br/></head> <br/><body> <br/><Div & gt; <br/><Span> The sole & lt;/span> <P> Line - white ice, is the color of my world, unique and reclusion, my "freedom" not only do not let others decide my life, still know my personality, maintaining my individuality, synonymous with decide my life goal; Never to "status", "power" as the goal, only for his own heart dream, take good care of the matter, guardian of the struggle, & lt;/p> <br/></div> <br/></body> <br/></html> <br/>OK, above is my paragraph 2 by using CSS, sinking method, hope to help you, <br/><p class="article - content rp"> CodePudding user response: </p><style type="text/CSS" & gt; <br/>{p1, the font size: 14 px; } <br/>P1: first - letter {float: left; Color: # f00; The font - size: 2 em; font-weight:bold; } <br/></style> <br/><P & gt; Sigh agghh & lt;/p> <br/><p class="article - content rp"> CodePudding user response: </p>Picture how to set? Let the picture seems to be sinking acronym effect </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/61132.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/61132.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/61131.html'>As shown in figure enterprise WeChat document in the third step, how to write asp code to decrypt th</a></div> <div class="detail-arr-right">Next:<a href='/frontend/61133.html'>How can I write this page urgently pursuing big brand</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=HTML+%28CSS%29' target='_blank'>HTML (CSS)</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>