css+js实现伸缩动态分页栏悬浮点击效果代码
代码语言:html
所属分类:其他
代码描述:css+js实现伸缩动态分页栏悬浮点击效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> ul { padding: 0; margin: 0; list-style: none; display: flex; justify-content: space-around; align-content: center; width: calc(7 * 20px + 38px); } ul li { width: 10px; height: 10px; border-radius: 5px; background: grey; transition: width 0.3s ease-in-out; cursor: pointer; } ul li button { display: inline-block; visibility: hidden; } ul li:hover { background: orange; width: 15px; } ul li.active { background: red; width: 38px; } body { display: grid; place-items: center; min-height: 100vh; font-family: sans-serif; } .pagination_component { display: flex; flex-direction: column; align-items: center; gap: 2rem; } .pagination_component p { font-weight: 600; font-size: 1.2rem; color: #444; } </style> </head> <body > <div class="pagination_component"> <p>Click some pagination element</p> <ul class="pagination"> <li class=.........完整代码请登录后点击上方下载按钮下载查看
网友评论0