(2)Merry Christmas(桌機main)

【範例結果】

三、【figure】圖說  美化

section2 :美化

原始:

section:nth-child(2) {
  background: #263238;
}
figure {
    background: #b2dfdb;
    border: 1px solid #033329;
    width: 20%; padding: 1%; margin: 1%;
    box-sizing: border-box;
}

figure img{
    width: 75%;
}

問題一:figure圖說中,圖片置中

說明:

figure img{
    width: 75%;
    display: block; margin: auto;
}

問題二:figure圖說依序並排方法

方法1:inline-block

figure {  
    /*方法1: inline-block */
    display: inline-block; vertical-align: middle;
}

方法2:float

section:nth-child(2) {
    overflow: hidden;
}
figure {
    /*方法2: float*/
    float: left;
}

方法3:flex 【待續…】

 

問題三:【more】鈕美化

.more_s{    
    color: #fff; 
    width: 50px; text-align: center; padding: 5px;
    background-image: linear-gradient( to right bottom,#de578a,#d64078);
    border: solid  1px #90254d;
    box-shadow: 1px 1px #90254d,1px 1px #90254d,1px 1px #90254d,1px 1px #90254d,1px 1px #90254d;
    text-shadow: 1px 1px #555;
    border-radius: 5px;
}

.more_s:active {
    background-image: linear-gradient( to right bottom,#d64078,#de578a);
	box-shadow: 1px 1px #90254d;transform: translate(1px, 1px);
    text-shadow: -1px -1px #555;
}

最後美化設定

figcaption{
    font-size: 1.2em; border-bottom: 3px double #960000;
    margin: 10px auto;
    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

figure ul{
  padding-left: 30px;
  width: 90%;
  align-self: flex-start;
}
figure li{
  list-style-image: url(image/icon02.png);
}