J'ai ajouté le débordement-y: Faites défiler jusqu'à Matérialiser les collections depuis que je définis la hauteur d'emballage fixe. Cependant, je cherche à faire les barres de défilement transparentes. J'ai trouvé des questions et des réponses sur l'ajout de webkit. Mais il jette des erreurs et je sais que ce ne sont pas additionnels dans réagis. J'ai essayé avec CSS externe avec un identifiant spécifique. Mais ça ne marche toujours pas. Les contenus sont vraiment laids à mes yeux avec la barre de défilement. ci-dessous est le réacteur. p> note - J'utilise chrome et développant avec réaction, Babel CDNS. P> < / p>
3 Réponses :
Vous pouvez également essayer ceci:
#no-scroll1::-webkit-scrollbar {
width: auto;
}
#no-scroll1::-webkit-scrollbar-track, #no-scroll1::-webkit-scrollbar-thumb {
background: transparent;
}
Vérifiez l'extrait et la mise en œuvre de Stackblitz réagit, Stackblitz Demo .
P>
<div id="no-scroll1" class="col s2 z-depth-2 grey lighten-5 no-scroll" style="height: 10em; width:200px; overflow-y: scroll"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div>
Si vous utilisez largeur: 0PX code>. Quel est le cas pour utiliser arrière-plan: transparent code>?
@Nipunjain Je ne suis pas un expert en CSS, je viens de recréer ses propriétés CSS à la fois Stackblitz et l'extrait :)
défaut:
p>
après: p>
p>
Bonjour et bienvenue à Stackoverflow, et merci d'avoir répondu. Bien que ce code puisse répondre à la question, pouvez-vous envisager d'ajouter des explications à ce que le problème était résolu et comment vous l'avez résolu? Cela aidera les futurs lecteurs à mieux comprendre votre réponse et en apprendre.
Pouvez-vous nous montrer le code où vous avez essayé d'ajouter
webkit code> défiler des barres de défilement?Je viens d'éditer @agney