vue实现星级选择
代码语言:html
所属分类:星级评分
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> Vue.js Star Rating</title> <style> #app { display: flex; align-items: center; justify-content: center; height: 100vh; } .star-rating { color: gold; display: inline-block; font-size: 4em; position: relative; transform: translate(-6px); } .star-rating__max, .star-rating__current { position: absolute; top: 0; } .star-rating__current { overflow: hidden; white-space: nowrap; } </style> </head> <body translate="no"> <div id="app"> <div class="card"> <div class="card-content"> <div class="media-content"> <p class="title is-4">Star Rating</p> <p class="subtitle is-6">A simple VueJS rating component</p> </div> <star-rating :max="5" :current="value"></star-rating><br> <br> <button class="button" @click="randomValue&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0