1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-26 03:08:14 +01:00

Add 3D card pattern

This commit is contained in:
Phuoc Nguyen
2021-04-04 12:07:33 +07:00
parent c821834390
commit 3be0f73232
8 changed files with 212 additions and 3 deletions

View File

@@ -0,0 +1,60 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
* (c) 2019 - 2021 Nguyen Huu Phuoc <https://twitter.com/nghuuphuoc>
*/
import * as React from 'react';
import Frame from '../../placeholders/Frame';
const Cover: React.FC<{}> = () => {
return (
<Frame>
<div
style={{
alignItems: 'center',
display: 'flex',
height: '100%',
justifyContent: 'center',
padding: '1.5rem',
}}
>
<div
style={{
border: '1px solid rgba(0, 0, 0, 0.3)',
height: '2rem',
position: 'relative',
width: '100%',
}
}>
<div
style={{
background: 'rgba(0, 0, 0, 0.3)',
height: '100%',
top: '0.5rem',
left: 0,
position: 'absolute',
transform: 'translate(-100%, 0) skewY(-45deg)',
transformOrigin: 'top left',
width: '0.5rem',
}}
/>
<div
style={{
background: 'rgba(0, 0, 0, 0.3)',
bottom: 0,
height: '0.5rem',
left: 0,
position: 'absolute',
transform: 'translate(0, 100%) skewX(-45deg)',
transformOrigin: 'top left',
width: '100%',
}}
/>
</div>
</div>
</Frame>
);
};
export default Cover;