css按鈕固定

(一)項目需求+效果圖

1.需求

不同的手機型號,按鈕距離底部的距離相等。

2.效果圖

在這裏插入圖片描述

(二)代碼+代碼解析

1.代碼

/* 拒絕和同意按鈕的樣式 */
.reject {
  margin-left: 10%;
  width: 35%;
  line-height: 10px;
  position: fixed;
  bottom:15px;
}
.agree {
  margin-left: 56%;
  width: 35%;
  line-height: 10px;
  position: fixed;
  bottom:15px;
}

2.代碼解析

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章