Kann css dieses Ding? und wenn ja, wie nennt man das? Vielen Dank. Ich bin neu in CSS CSS geändert Box und Text
-1
A
Antwort
1
Ich bin nicht sicher, was Sie unter „dieses“ aber ich denke, Sie so etwas wie dies bedeutete:
div {
display: inline-block;
border: 1px solid #000;
padding: 5px;
margin-top: 1em;
}
span {
float: left;
background: #fff;
padding: 0 5px;
margin-top: -1em;
}
<div>
<span>About us</span>
</div>
2
Sie können es tun, indem html
<form>
<fieldset>
<legend>Personalia:</legend>
Name: <input type="text"><br>
Email: <input type="text"><br>
Date of birth: <input type="text">
</fieldset>
</form>
die Quelle Link: https://www.w3schools.com/tags/tag_fieldset.asp
1
.item{
border:2px solid black;
border-top:0px;
}
h2 {
width: 100%;
text-align: center;
border-bottom: 2px solid #000;
line-height: 0.1em;
margin: 10px 0 20px;
}
h2 span {
background:#fff;
padding:0 10px;
}
<div class="item">
<h2 class="left"><span>about us</span></h2>
</div>
0
ich Hilfe von position
s bekommen für diese Frage zu lösen!
div {
position: relative;
width: 400px;
padding: 10px;
border: 1px solid;
border-radius: 5px;
}
span {
position: absolute;
top: -10px;
background-color: #FFF;
color: red;
}
input {
width: 100%;
}
<div>
<span>Enter Name</span>
<input type="text">
</div>
Verwandte Themen
- 1. CSS: Box + Text über Bild
- 2. styling text box mit css
- 3. CSS Hintergrund Text füllt die Box
- 4. CSS Button Animation von Text zu Box
- 5. CSS-Box funktioniert nicht, markiert Text
- 6. CSS Triangel und Box-Schatten
- 7. HTML CSS Box Styling
- 8. Search Box Css Modification
- 9. Standard Unity Sky-Box geändert?
- 10. CSS-Box/ul-Menü
- 11. Format Text im Rich Text Box
- 12. CSS - Boxen in Box
- 13. CSS-Text-Überlauf Ellipse Hover und enthüllen Text in Pop-out-Box
- 14. CSS gekrümmte Farbverläufe und Box-Shadow
- 15. CSS - White-Box-Umgebung
- 16. CSS Info Box Hover
- 17. Wrapping Text mit CSS
- 18. Zentrierter Text in einer quadratischen CSS-Box mit Rahmen?
- 19. Zentrieren Sie eine CSS-Box mit dem Text daneben
- 20. CSS-Problem Box-Schatten mit vertikal gerenderten Text
- 21. Machen Sie responsive CSS-Box mit Text drin
- 22. HTML CSS-Styling-Box
- 23. CSS/HTML-Center-Box
- 24. Box Verpackung mit CSS
- 25. Rich Text Box WPF startselection und Länge
- 26. gebogene Box mit css
- 27. CSS Box Shapes
- 28. CSS Box-Schatten-Overlap
- 29. Info-Box mit CSS - Bootstrap
- 30. CSS-Box Schatten funktioniert nicht