Colocar a função de rolar a tela quando o link for direcionar para algum id da mesma tela - Follow Up Deployment
Browse files- index.html +22 -0
index.html
CHANGED
|
@@ -39,6 +39,10 @@
|
|
| 39 |
display: block;
|
| 40 |
}
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
.hero-pattern {
|
| 43 |
background-image: radial-gradient(#2b6cb0 1px, transparent 1px);
|
| 44 |
background-size: 20px 20px;
|
|
@@ -237,5 +241,23 @@
|
|
| 237 |
</div>
|
| 238 |
</footer>
|
| 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=maralvic/tt2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 241 |
</html>
|
|
|
|
| 39 |
display: block;
|
| 40 |
}
|
| 41 |
|
| 42 |
+
html {
|
| 43 |
+
scroll-behavior: smooth;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
.hero-pattern {
|
| 47 |
background-image: radial-gradient(#2b6cb0 1px, transparent 1px);
|
| 48 |
background-size: 20px 20px;
|
|
|
|
| 241 |
</div>
|
| 242 |
</footer>
|
| 243 |
|
| 244 |
+
<script>
|
| 245 |
+
// Smooth scrolling for anchor links
|
| 246 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 247 |
+
anchor.addEventListener('click', function (e) {
|
| 248 |
+
e.preventDefault();
|
| 249 |
+
const targetId = this.getAttribute('href');
|
| 250 |
+
if (targetId !== '#') {
|
| 251 |
+
const targetElement = document.querySelector(targetId);
|
| 252 |
+
if (targetElement) {
|
| 253 |
+
targetElement.scrollIntoView({
|
| 254 |
+
behavior: 'smooth',
|
| 255 |
+
block: 'start'
|
| 256 |
+
});
|
| 257 |
+
}
|
| 258 |
+
}
|
| 259 |
+
});
|
| 260 |
+
});
|
| 261 |
+
</script>
|
| 262 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=maralvic/tt2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 263 |
</html>
|