html⽂字置顶的代码是什么,html–顶部对齐⽂本与旁边的固定
图像?
我的页⾯上有⼀个固定的图像,始终垂直居中.它旁边是⼀个可滚动的⽂本墙,我总是希望在页⾯加载时与固定图像的顶部垂直对齐.如此处所⽰(红⾊条表⽰它是如何最⾼的):
html滚动效果代码
现在,如代码⽚段所⽰,我有右侧div与填充顶部:60px适⽤于我的电脑屏幕.但第⼆次我切换到⼿机或平板电脑这不再有效.
如何在页⾯加载时这样做,⽂本的顶部始终与图像的顶部对齐?
.left-div {
position: fixed;
top: 50%;
transform: translateY(-50%);
height: 60%
}
.left-div>img {
height: 100%;
}
.right-div {
margin-left: 250px;
padding-right: 10px;
padding-top: 60px;
}
I am happy to join with you today in what will go down in history as the greatest demonstration for freedom in the history of our nation.
Five score years ago,a great American,in whose symbolic shadow we stand today,signed the Emancipation Proclamation. This momentous decree came as a great beacon light of hope to millions of Negro slaves who had been seared in the flames of withering
injustice. It came as a joyous daybreak to end the long night of captivity.
But one hundred years later,the Negro still is not free. One hundred years later,the life of the Negro is still sadly crippled by the manacles of segregation and the chains of discrimination. One hundred years later,the Negro lives on a lonely island
of poverty in the midst of a vast ocean of material prosperity. One hundred years later,the Negro is still languished in the corners of American society and finds himself in exile in his own land. So we have come here today to dramatize an shameful
condition.
In a sense we've come to our nation's Capital to cash a check. When the architects of our republic wrote the magnificent words of the Constitution and the Declaration of Independence,they were signing a promissory note to which every American was to
fall heir.
This note was a promise that all men,yes,black men as well as white men,would be guaranteed the unalienable rights of life,liberty,and the pursuit of happiness.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。