第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在不添加太多內(nèi)容的情況下增加圖像的背景尺寸?

如何在不添加太多內(nèi)容的情況下增加圖像的背景尺寸?

慕桂英546537 2023-12-11 16:02:22
我正在嘗試在背景上添加背景圖像,我可以做到這一點,但它沒有顯示我使用此代碼的圖像的完整尺寸。當(dāng)我嘗試使用背景大小自動時,我得到了正確的寬度,但高度很小,我知道這取決于內(nèi)容大小。但還是有什么辦法<div style="background: url('https://firebasestorage.googleapis.com/v0/b/growthfilepractice.appspot.com/o/1%20(2).jpg?alt=media&token=48244df9-a2bb-412a-81f5-854e2dbc4939');background-repeat: no-repeat;background-size:500px 500px;">  <a href ="https://github.com/" style="text-decoration: none;">    <table>      <tr>        <td><h3 style="color: #fff;">Amarjeet Singh</h3></td>      </tr>      <tr>      </tr>    </table>  </a></div>
查看完整描述

2 回答

?
慕絲7291255

TA貢獻(xiàn)1859條經(jīng)驗 獲得超6個贊

該圖像被設(shè)置為您的背景<div>,因此它的大小將取決于該圖像的width和。因此,如果高度較大,則會顯示更多內(nèi)容。只是為了說明,請檢查下面我的代碼。我已經(jīng)給出了a ,現(xiàn)在圖像顯示了該高度。height<div>background-image<div>height : 600px


因此,簡而言之,您的背景圖像僅顯示元素的大小。元素越大,圖像就會出現(xiàn)越多。


<div  class="container" 

      style=" height: 600px; /* Just to illustrate */

              position: relative;

              background: url('https://firebasestorage.googleapis.com/v0/b/growthfilepractice.appspot.com/o/1%20(2).jpg?alt=media&token=48244df9-a2bb-412a-81f5-854e2dbc4939');

              background-repeat: no-repeat;

            background-size:500px 500px;">

  <a  class="nameAnchor" 

      href ="https://github.com/" 

      style=" text-decoration: none;

              position: absolute;

              color: white;

              left: 10px; /* Set your Left position here */

              top: 100px; /* set your top position here */

  ">

    <span>Amarjeet Singh</span>

  </a>

</div>


查看完整回答
反對 回復(fù) 2023-12-11
?
絕地?zé)o雙

TA貢獻(xiàn)1946條經(jīng)驗 獲得超4個贊

我建議你設(shè)置背景大?。悍饷妗H绻胍脑?,這會自動將其設(shè)置為完整尺寸。



查看完整回答
反對 回復(fù) 2023-12-11
  • 2 回答
  • 0 關(guān)注
  • 138 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號