前々から「CSSだけでお洒落なモーダルウィンドウ作れないかな~」と思って色々と試していたんですが、ようやく納得のいく出来の物が完成したので載せておきます。 PureCSS ModalWindow 仕組みは後で解説するとして、とりあえず作ったサンプルを5つ紹介します。 一応、画面外をクリックしてウィンドウを閉じる機能にも対応していますし、ピュアCSSのモーダルウィンドウにしては珍しい閉じる際のアニメーションも実現できました。 通常パターン See the Pen PureCSS ModalWindow (Normal) by Kuzlog (@Kuzlog) on CodePen. 上から See the Pen PureCSS ModalWindow (Top) by Kuzlog (@Kuzlog) on CodePen. 拡大 See the Pen PureCSS ModalWind