/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2021 Nguyen Huu Phuoc */ import * as React from 'react'; import { Helmet } from 'react-helmet'; import { Link } from 'react-router-dom'; import Heading from '../../components/Heading'; import RelatedPatterns from '../../components/RelatedPatterns'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import BrowserFrame from '../../placeholders/BrowserFrame'; const Details: React.FC<{}> = () => { return (
...
`} css={` .container { position: relative; } .container__wrapper { /* Displayed at the top left corner */ left: 0px; position: absolute; top: 0px; /* Size */ height: 100px; width: 100px; /* Hide the part of its children which is displayed outside */ overflow: hidden; } .container__ribbon { /* Position */ left: -64px; position: absolute; top: 32px; /* Size */ height: 24px; width: 206px; /* Displayed diagonally */ transform: rotate(-45deg); /* Background color */ background-color: rgba(0, 0, 0, 0.3); /* Centerize the text content */ text-align: center; } `} >
You can add a ribbon to a pricing table to indicate the most popular option.
Popular
); }; export default Details;