#app { display: flex; flex-wrap: wrap; align-items: flex-start; width: 100%; max-width: 940px; margin: 0 auto; padding: 20px; box-sizing: border-box; } .more { margin: 0 auto; padding: 20px; border-radius: 5px; box-sizing: border-box; //コンテンツ &__content { position: relative; height: auto; max-height: 50px; //高さは調整 overflow: hidden; transition: max-height 1s; //開閉時間 //コンテンツをグラデーションで隠す擬似要素 &::after { content: ''; position: absolute; top: 0; left: 0; z-index: 1; display: block; width: 100%; height: 100%; transition: 1s; background: linear-gradient(to bottom, transparent 0%, #ffffff 100%); } //コンテンツを開いた際に付与するクラス &.open { &:after { z-index: -1; opacity: 0; } } } //もっと見る &__btn { display: block; margin: 0 auto; padding: 8px 40px; border: 0; color: #ffffff; background-color: #00c2bc; cursor: pointer; } }