css固定定位_css定位布局(w3cschool)
生活随笔
收集整理的這篇文章主要介紹了
css固定定位_css定位布局(w3cschool)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css固定定位</title>
<style>
#back{
width: 100px;
height: 100px;
background-color: #FF6500;
text-align: center;
line-height: 100px;(line-height=height垂直居中)
position: fixed;(固定定位)
bottom: 20px;
right: 20px;
z-index: 1000;(使目標懸浮在界面上,置于上層,數字可調整)
}
</style>
</head>
<body>
<div style="height: 1000px">
<div id="back">
返回頁面頂部
</div>
</div>
</body>
</html>
Jetbrains全家桶1年46,售后保障穩定
去除#back中position: fixed;(固定定位) bottom: 20px; right: 20px;效果為總結
以上是生活随笔為你收集整理的css固定定位_css定位布局(w3cschool)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Jerry在2020 SAP全球技术大会
- 下一篇: spring-schedul实现动态添加