Legendary

李洋的学习笔记


令人眼前一亮的css

<h2>n行文本超出隐藏</h2> <pre><code>&lt;style&gt; //一行 .one-lline{ white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all; } //两行 .two-line{ word-break: break-all; text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; } &lt;/style&gt; // 拟态样式 &lt;style&gt; body { background: #ecf0f3; } div { position: relative; float: left; width: 200px; height: 200px; margin-left: 80px; margin-top: 80px; background: #ecf0f3; } .drop-shadow { border-radius: 20px; box-shadow: 18px 18px 30px #d1d9e6, -18px -18px 30px #fff; } .inner-shadow { border-radius: 20px; box-shadow: inset 18px 18px 30px #d1d9e6, inset -18px -18px 30px #fff; } .inner-shadow-ring { border-radius: 100%; box-shadow: inset 9px 9px 15px #d1d9e6, inset -9px -9px 15px #fff; } .inner-shadow-ring:before { content: ""; position: absolute; left: 20%; top: 20%; width: 60%; height: 60%; border-radius: 100%; background: #ecf0f3; box-shadow: 9px 9px 15px #d1d9e6, -9px -9px 15px #fff; } &lt;/style&gt; &lt;div class="drop-shadow"&gt;&lt;/div&gt; &lt;div class="inner-shadow"&gt;&lt;/div&gt; &lt;div class="inner-shadow-ring"&gt;&lt;/div&gt; // https://neumorphism.io/#55b9f3</code></pre>

页面列表

ITEM_HTML