简体   繁体   中英

How to design a simple listview(like Android) using only html and css(without using bootstrap)

I want to design a Listview like Android using only Html and css without using bootstrap.I tried with Ul and li but in this only bullet is coming.

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

I want like Listview like below image. 在此处输入图片说明 Can anyone please suggest me how to acheive this.

 ul{ width:200px; background:gray; color:white; list-style-type:none; margin:0; padding:0; } li{ border:2px solid black; padding:5px; } li:last-child{ border-bottom:none; } li:hover{ background:red; color:black; } 
 <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> 

you have to edit your css file like this

ul {
list-style-type: none;
}

so the list won't have bullets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM