我正在创建这些叠加的上一个和下一个箭头,就像本网站上的那些 - http://www.usatoday.com
我得到的问题是在Chrome中,箭头不会保持固定,当我向下滚动页面箭头随页面上升而你再也看不到它们了.奇怪的是,在Firefox中他们的工作并保持在最高位置:45%的位置:他们应该像往常一样固定.以下是ff如何工作的截图:https://www.dropbox.com/s/2vsrv874c3urlqs/firefox.PNG
这里是chrome:https://www.dropbox.com/s/zgr2zhkcnohykgj/chrome.PNG
箭头的html:
<div class="overlay-arrows">
<div class="front-arrow-wrapper">
<a href="#" rel="prev" class="prev-link">
<div class="prev-icon">
</div>
<div class="prev-overlay">
<span class="categ-next">Category for prev</span>
<p>Title of the post for prev</p>
</div>
</a>
<a href="#" rel="next" class="next-link" >
<div class="next-icon">
</div>
<div class="next-overlay">
<span class="categ-next">Category for next</span>
<p>Title of the post for next</p>
</div>
</a>
</div> <!--end .front-arrow-wrapper -->
</div> <!--end overlay-arrows -->
Run Code Online (Sandbox Code Playgroud)
和CSS:
.overlay-arrows{
position: fixed;
top: 45%;
left: 0;
width: 100%;
z-index: 9999;
overflow: …Run Code Online (Sandbox Code Playgroud) 我必须创建一个列表,比如50个人(在Java中)并显示列表,我真的不知道该怎么做.所以这就是我到目前为止所做的.请更正并完成我的一些代码.
public class Person {
String name;
String stuff;
}
public class CreatePerson {
public static void ang() {
ArrayList<Person> thing=new ArrayList<Person>();
Scanner diskScanner = new Scanner(in);
for(int i=0; i<50; i++){
Person pers = new Person();
out.print("name: ");
pers.name=diskScanner.nextLine();
out.print("stuff: ");
pers.stuff=diskScanner.nextLine();
thing.add(pers);
break;
}
// Display people
for (int i=0; i<50; i++) {
out.println(??);{
}
} }}
Run Code Online (Sandbox Code Playgroud)