Skip to content

Latest commit

 

History

History
99 lines (92 loc) · 3.22 KB

blurry-weaken-background.md

File metadata and controls

99 lines (92 loc) · 3.22 KB

Blurry waken background

?> Background::point_right: css-boxshadow, HTML < dialog >

<script v-pre type="text/x-template" id="blurry-weaken-background_tlp"> <style> main { width: 100%; user-select: none; font: 14px / 1 Helvetica, sans-serif; } main { position: relative; padding: 30px 50px; hyphens: auto; text-align: justify; transition: .6s filter; } article.de-emphasized{ filter: blur(5px); } article .btn{ padding: 6px 1em; border-radius: 3px; outline: none; } dialog{ width: 400px; height: 120px; text-align: center; line-height: 84px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0 .1em .2em rgba(0,0,0,.5), 0 0 0 50vmax rgba(0,0,0,.3); z-index: 99; } dialog:not([open]){ display: none; } </style> Show dialog

Bacon ipsum dolor amet consectetur short loin ut tri-tip alcatra ground round jowl beef meatloaf in pork. Elit chicken ea spare ribs. Shank andouille ex boudin picanha turkey esse. Do doner fugiat tongue.

Chuck filet mignon flank pork chop mollit enim veniam sed pork loin aliquip sausage prosciutto in deserunt. Nostrud porchetta non nulla sunt. Cupim et velit picanha laborum salami capicola exercitation alcatra sausage cillum shoulder minim esse. Pig boudin aliquip aute, tail ut cow incididunt short loin aliqua.

Doner alcatra pastrami pig, strip steak eu in frankfurter occaecat in filet mignon chuck short loin nulla meatloaf. Adipisicing aliqua kielbasa nulla proident. Ground round meatloaf kevin, shank adipisicing pork frankfurter t-bone spare ribs cupidatat. Sed ham non duis enim, in ipsum fugiat est tongue short ribs ad bresaola prosciutto. Non minim picanha, ad in occaecat fugiat veniam dolor deserunt.

Hi~ I'm a dialog. Click to close. <script> export default { methods: { handleBtnClick(e) { const { dialog, article } = this.$refs; dialog.show(); article.classList.add('de-emphasized'); }, handleDialogClick(e) { const { dialog, article } = this.$refs; dialog.close && dialog.close(); article.classList.remove('de-emphasized'); } } } </script> </script>

Greate user experience should always go first as a habit ~

Browser Support

<iframe width="100%" height="436px" frameborder="0" src="https://caniuse.bitsofco.de/embed/index.html?feat=css-boxshadow&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false"> </iframe> <iframe width="100%" height="528px" frameborder="0" src="https://caniuse.bitsofco.de/embed/index.html?feat=dialog&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false"> </iframe>