新聞中心
Bootstrap4 圖像形狀
圓角圖片
.rounded 類可以讓圖片顯示圓角效果:

無為網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)公司!從網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、APP開發(fā)、響應式網(wǎng)站開發(fā)等網(wǎng)站項目制作,到程序開發(fā),運營維護。創(chuàng)新互聯(lián)公司自2013年起到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運維經(jīng)驗,來保證我們的工作的順利進行。專注于網(wǎng)站建設就選創(chuàng)新互聯(lián)公司。
實例
<
img
decoding
=
"
async
"
src
=
"
cinqueterre.jpg
"
class
=
"
rounded
"
alt
=
"
Cinque Terre
"
>
嘗試一下 ?
橢圓圖片
.rounded-circle 類可以設置橢圓形圖片:
實例
<
img
decoding
=
"
async
"
src
=
"
cinqueterre.jpg
"
class
=
"
rounded-circle
"
alt
=
"
Cinque Terre
"
>
嘗試一下 ?
縮略圖
.img-thumbnail 類用于設置圖片縮略圖(圖片有邊框):
實例
<
img
decoding
=
"
async
"
src
=
"
cinqueterre.jpg
"
class
=
"
img-thumbnail
"
alt
=
"
Cinque Terre
"
>
嘗試一下 ?
圖片對齊方式
使用 .float-right 類來設置圖片右對齊,使用 .float-left 類設置圖片左對齊:
實例
<
img
decoding
=
"
async
"
src
=
"
paris.jpg
"
class
=
"
float-left
"
>
<
img
decoding
=
"
async
"
src
=
"
cinqueterre.jpg
"
class
=
"
float-right
"
>
嘗試一下 ?
圖片居中
使用 .mx-auto (margin:auto) 和 .d-block (display:block) 類來設置圖片居中對齊:
實例
<
img
decoding
=
"
async
"
src
=
"
paris.jpg
"
class
=
"
mx-auto d-block
"
>
嘗試一下 ?
響應式圖片
圖像有各種各樣的尺寸,我們需要根據(jù)屏幕的大小自動適應。
我們可以通過在 標簽中添加 .img-fluid 類來設置響應式圖片。
.img-fluid 類設置了 max-width: 100%; 、 height: auto; :
實例
<
img
decoding
=
"
async
"
class
=
"
img-fluid
"
src
=
"
img_chania.jpg
"
alt
=
"
Chania
"
>
嘗試一下 ?
網(wǎng)頁標題:創(chuàng)新互聯(lián)Bootstrap4教程:Bootstrap4圖像形狀
本文路徑:http://m.5511xx.com/article/dpeceeo.html


咨詢
建站咨詢
