Advertisement
1xptolevitico69

Javascript - Estilos inline - exemplos

May 29th, 2020
1,287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.68 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Como criar estilos inline dentro do DOM ( script )</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width">
  7. <style>
  8.  
  9. </style>
  10. </head>
  11. <body>
  12.  
  13.  
  14. <script>
  15.  
  16. p = document.createElement('p');
  17. document.body.appendChild(p);
  18.  
  19. p.innerHTML="<span style='border:5px solid red;display:block;width:800px;height:500px;margin:30px auto;font-size:25px;font-family:courier new;font-weight:bold;overflow:hidden;overflow-y:scroll;color:maroon;padding:20px;text-align:justify;'><span id='top' style='display:block;padding:30px 0;text-align:center;font-size:40px;'>By Kafka</span><span style='margin-left:100px;'><a title='text indent' href='https://www.w3schools.com/cssref/pr_text_text-indent.asp'>One</a></span> morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. <a title='font weight' href='https://www.w3schools.com/cssref/pr_font_weight.asp'>He</a> lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. <a title='overflow' href='https://www.w3schools.com/cssref/pr_pos_overflow.asp'>The</a> bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 'What is happened to me?' he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls. A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. <a title='text align' href='https://www.w3schools.com/cssref/pr_text_text-align.ASP'>It</a> showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather.Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. <a href='#top'>Top</a></span>";
  20.  
  21.  
  22.  
  23.  
  24. </script>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement