driverjs实现一个自适应页面新手指南引导层效果代码
代码语言:html
所属分类:响应式
代码描述:driverjs实现一个自适应页面新手指南引导层效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/driver.min.css"> <style> @import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap"); body { display: grid; width: 100%; margin: 0; font-family: "Lato", sans-serif; } body .menu { background: #00000020; margin: 0; width: 5rem; border-radius: 0 0 0.5rem 0; padding: 1rem 0; display: grid; align-items: center; justify-items: center; position: fixed; grid-gap: 1rem; height: 30rem; } body .menu span { cursor: pointer; } body .menu span:hover { color: #444; } body .menu span.logo { background: #22222290; color: white; padding: 0.5rem; border-radius: 3rem; font-size: 1.75rem; border: 5px solid #22222290; } body .content { margin-left: 5rem; width: calc(100% - 7rem); padding: 1rem; columns: 4 200px; column-gap: 1rem; } body .content .card { background: #00000015; padding: 1rem; background-size: cover; margin: 0 0 1rem; break-inside: avoid; border-radius: 0.4rem; display: flex; flex-flow: column; } body .content .card.landscape { min-height: 12.5rem; } body .content .card.image { min-height: 33rem; } body .content .card img { width: 175px; margin: 1rem auto; border: 0.5rem solid #fff; } body .content .card .tags { list-style: none; display: inline-flex; margin: 0; padding: 0; } body .content .card .tags li { margin: 0.2rem; background: #fff; padding: 0.5rem; border-radius: 0.2rem; cursor: pointer; } body .content .card .tags li:hover { background: #00000020; } body .content .card button { border: 1px solid #222; padding: 0.5rem; border-radius: 0.2rem; width: fit-content; cursor: pointer; font-size: 1rem; } body .content .card button:hover { background: #22222221 0; } body .content .card h3 { margin: 1rem 0 0 0; } body .content .card.event h2, body .content .card.event h3 { text-align: center; } #start { border: 1px solid #222; padding: 0.5rem; border-radius: 0.2rem; width: fit-content; cursor: pointer; background: white; position: absolute; right: 3.5rem; top: 0.6rem; font-size: 1rem; } #start:hover { background: #e2e2e2; } .material-icons { font-family: "Material Icons"; font-weight: normal; font-style: normal; margin: 0.5rem; font-size: 4rem; /* Preferred icon size */ display: inline-block; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: "liga"; } #add { position: absolute; right: 0.5rem; top: 0.5rem; font-size: 2rem; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: 3rem; background-color: white; border: 1px solid; cursor: pointer; } #add:hover { background: #e2e2e2; } </style> </head> <body> <!-- spotlights & highlights 💡--> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <button id="start">Start a tour! </button> <button id="add">+</button> <div class="menu" id="menu"> <span class="material-icons logo"> pets </span> <span class="material-icons"> menu </span> <span class="material-icons" id="search"> search </span> <span class="material-icons"> person </span> <span class="material-icons"> calendar_today </span> <span class="material-icons"> collections </span> <span class="material-icons"> email </span> </div> <div class="content masonry"> <div class="card image" id="card" style="background-image:url('//repo.bfw.wiki/bfwrepo/image/5e7d467b45154.png');"> <ul class="tags" id="tags"> <li>Pets</li> <li>Images</li> </ul> </div> <div class="card"> <ul class="tags"> <li>Notes</li> <li>Dog Breeds</li> </ul> <p>The dachshund, also known as the wiener dog, badger dog, sausage dog, is a short-legged, long-bodied, hound-type dog breed. They may be smooth, wire, or long-haired.</p> <a href="">Wikipedia </a> </div> <div class="card"> <ul class="tags"> <li>Recipes</li> </ul> <img src="//repo.bfw.wiki/bfwrepo/image/5e7d467b45154.png" /> <h3>Pupcakes</h3> <p> These pupcakes are the best way to celebrate any occasion with your dog! </p> <button>See the Recipe</button> </div> <div class="card"> <ul class="tags"> <li>Notes</li> <li>Dog Breeds</li> </ul> <p>The Labrador Retriever, often abbreviated to Labrador or Lab, is a breed of retriever-gun dog from the United Kingdom that was developed from imported Canadian fishing dogs. The Labrador is one of the most popular dog breeds in a number of countries in the world, particularly in the Western world. </p> <a href="">Wikipedia </a> </div> <div class="card event" id="event"> <ul class="tags"> <li>Events</li> </ul> <h2>Puppy Picnic! 🧺🐶</h2> <h3>23.4.2022</h3> <p>Picnic with puppies! Rain or shine, we will be there.</p> <button id="calendar">Add to Calendar </button> </div> <div class="card landscape" style="background-image:url('//repo.bfw.wiki/bfwrepo/image/5e7d467b45154.png');"> <ul class="tags"> <li>Pets</li> <li>Images</li> </ul> </div> <div class="card"> <ul class=".........完整代码请登录后点击上方下载按钮下载查看
网友评论0