爲了做到這一點,我必須合併代碼與廣告的html代碼,image..is有任何方式或代碼保持一個固定屏幕的一部分(不受滾動的影響),不管該空間中是否存在任何元素。代碼保持圖像,廣告固定在屏幕上的一個地方
-3
A
回答
0
你可以通過像在你的CSS文件中指定位置固定的風格和形象廣告部分:
img {position:fixed;}
0
你應該看看用CSS布點。更具體地說,position
屬性。 你的情況,你可以如下定義CSS類,並將其分配給你的元素:
.makeMeFix {
position:fixed,
bottom: 0px,
left: 0px,
width: 30px,
height: 30px
}
這將導致一個元素的大小爲30x30px被固定在左下角。 http://www.w3schools.com/css/css_positioning.asp
0
添加位置固定,並用css頂部,左側修改其位置,右邊或底部
.img-container {
position: fixed;
top: 0;
width: 100%;
height: 50px;
background-color: black;
}
<div class="img-container">
<!-- Put image here -->
</div>
<div class="text-content-container">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
</div>
相關問題
- 1. 在應用程序屏幕上保持廣告/橫幅靜態
- 2. CSS將元素保持在屏幕上的「固定」位置
- 3. 保持gtk窗口固定在屏幕上
- 4. 保持一個UIButton固定在屏幕上時,推動和彈出UIViewController
- 5. contentView子視圖保持在屏幕上
- 6. 日期選擇器保持在一個固定的地方
- 7. 屏幕上的Inmobi Banner廣告
- 8. 保持屏幕上,哪種方式?
- 9. 在屏幕上交叉淡入淡出固定背景圖像
- 10. 谷歌地圖在android上保持空白屏幕
- 11. 製作一個屏幕截圖代碼支持多種屏幕尺寸
- 12. 在屏幕上旋轉保持圖像大小
- 13. CSS滑塊:保持圖像在屏幕上
- 14. 調整窗口大小廣告的div保持在同一個地方
- 15. 地方顯示了一個自定義的UI在屏幕上
- 16. Android:保持屏幕上
- 17. ChartBoost廣告暫停屏幕
- 18. 安卓在同一個地方的所有屏幕上放置圖像
- 19. 在Android的屏幕上全屏顯示插頁式廣告
- 20. 滾動android屏幕上的圖像屏幕上的圖像
- 21. 在上述nextpeer多人遊戲屏幕上方顯示Revmob全屏廣告
- 22. 如何在屏幕上顯示隨機圖像的代碼?
- 23. 保持圖像固定高度css
- 24. 保持在的LinearLayout屏幕
- 25. Javascript全屏幕圖像代碼
- 26. 代碼守候在固定營業場所的觸摸屏幕
- 27. 如何保持導航欄固定在大屏幕上只使用jquery
- 28. iOS iAd設備上的測試廣告示例屏幕截圖
- 29. 定位四個圖像在相同的地方,在屏幕上居中,在一個引導.container
- 30. Admob廣告未在屏幕方向上正確調整大小[包括圖片]
我想知道如果有可能不合並IMG {能力這樣做的:固定;}代碼與圖像,廣告代碼。 – harsher
我想保留一個SPACE固定...沒有代碼的東西。 – harsher
你能否提供你的問題與你寫的代碼!或詳細解釋你究竟想要什麼? 或者如果你可以使用bootstrap,那麼你可以在你的perticular div中添加class =「affix」! –