mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-22 05:33:15 +02:00
Add CSS panel for display patterns
This commit is contained in:
@@ -22,47 +22,57 @@ const Details: React.FC<{}> = () => {
|
||||
<div className='p-8 pb-20'>
|
||||
<BrowserFrame
|
||||
html={`
|
||||
<div style="
|
||||
position: relative;
|
||||
">
|
||||
<div class="container">
|
||||
<!-- Top-left corner -->
|
||||
<div style="
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
">
|
||||
<div class="container__corner container__corner--tl">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Top-right corner -->
|
||||
<div style="
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
">
|
||||
<div class="container__corner container__corner--tr">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Bottom-right corner -->
|
||||
<div style="
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
">
|
||||
<div class="container__corner container__corner--br">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Bottom-left corner -->
|
||||
<div style="
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
">
|
||||
<div class="container__corner container__corner--bl">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
`}
|
||||
css={``}
|
||||
css={`
|
||||
.container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container__corner {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.container__corner--tl {
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.container__corner--tr {
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.container__corner--br {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.container__corner--bl {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
`}
|
||||
>
|
||||
<div style={{ height: '100%', position: 'relative' }}>
|
||||
<div style={{ left: 0, position: 'absolute', top: 0 }}>
|
||||
|
Reference in New Issue
Block a user