溢出省略号:需要两个步骤
orders li .goods .txt{
flex: 1;
width: 0;
}
.orders li .goods .txt h4 {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
-webkit-line-clamp: 2;
}
变成圆形(前提要有宽和高)
border-radius: 50%;
光标变为手指
cursor: pointer;
背景图缩放
background-size: contain;
基线影响,行内图片和字对齐
vertical-align: middle;
flex为弹性盒子,即使固定了宽和高,内容多了也会撑开盒子,要想换行排列,需要加此属性(默认值是:flex-wrap: nowrap
)
flex-wrap: wrap;
表格合并左右相邻的边框
table {
border-collapse: collapse;
}
注意:加边框是给table
中的th,td
加
引入icon ,图片需要放在根目录下
<link rel="shortcut icon" href="./favicon.ico">