Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
#x {
border-bottom: 1px solid black;
height: 100px;
margin-bottom: 100px;
position: relative;
width: 200px;
}
#y {
background: black;
height: 200px;
left: 50px;
position: absolute;
width: 1px;
}
<div id="x">
<div id="y"></div>
</div>
adrian каза:... но аз лично бих оставил margin-bottom и бих направил още един див, който да се намира в <div id="x"></div>, позоционираш го пак абсолютно и го местиш където искаш.
За текста над чертата по същия начин.
#x {
border-bottom: 1px solid black;
height: 100px;
margin-bottom: 100px;
position: relative;
width: 200px;
}
#y {
background: black;
height: 200px;
left: 100px;
position: absolute;
width: 1px;
}
#over { position: absolute; left: 60px; }
#under { position: absolute; bottom: -20px; right: 0; }
Общо взето можеш да си позоционираш колкото искаш дивове в този.<div id="x">
<div id="y"></div>
<div id="over">Y axis</div>
<div id="under">X axis</div>
</div>
Благодарско ! <3adrian каза:#x {
border-bottom: 1px solid black;
height: 100px;
margin-bottom: 100px;
position: relative;
width: 200px;
}
#y {
background: black;
height: 200px;
left: 100px;
position: absolute;
width: 1px;
}
#over { position: absolute; left: 60px; }
#under { position: absolute; bottom: -20px; right: 0; }
Общо взето можеш да си позоционираш колкото искаш дивове в този.<div id="x">
<div id="y"></div>
<div id="over">Y axis</div>
<div id="under">X axis</div>
</div>
Демо