我是使用flexbox的新手,我有一個問題。
我不明白,為什么我的div的高度這么長。我試著輸入一個高度值,但它并沒有改變任何東西。
這是我的代碼:
<div className=" competences-content">
<div className=" competences-text-content">
<h1 className=" competences-title"> Langage de création</h1>。
<p className=" competences-text"> blablabla</p>。
</div>/span>
< input className=" competences-image" type="image" src="/assets/img/competences. png" />
</div>
我的CSS:
.competences-content{
display:flex;
flex-flow: row;
position: relative;
top: 45px;
width: 100%;
margin-left: 5%。
}
. competences-text-content{
flex-direction: column;
margin-right: 15px;
width: 50%。
}
.competences-title{
font-family: Poppins-bold;
color: #200A40;
字體大小: 44px;
letter-spacing: 1px;
}
.competences-text{
overflow-y: auto;
max-height: 50%。
font-family: Poppins-regular;
font-size: 10px;
line-height: 16px;
}
.competences-image{
height: 375px;
}
我試著逐一洗掉我的CSS值,不幸的是,沒有找到問題的原因。 你能幫助我嗎?
親切的問候
uj5u.com熱心網友回復:
. competences-text-content{
max-height: 你選擇的值。
flex-direction: 列。
margin-right: 15px;
width: 50%。
}
嘗試在css中為這個類添加最大高度屬性。并添加一個你希望它是px/rem的值。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/321900.html
標籤:
上一篇:有沒有類似于unique_ptr的沒有默認建構式的東西?
下一篇:紫線/條件性效果圖


