div tag is effective. Change to the invalidation solution principle of the p tag?
<!-- -->
<style>
:root{
--mainTheme:-sharpf4f4f4;
--mainFont: -sharp666;
--dropTheme:yellowgreen;
}
body{
background: var(--mainTheme);
color: var(--mainFont);
}
.dropdown-content { display: none; background: var(--dropTheme)}
.dropdown:hover .dropdown-content { display: block; }
</style>
<!-- -->
<body>
<p class="dropdown">
<span></span>
<div class="dropdown-content">
hello world
</div>
<div class="dropdown">
<span></span>
<div class="dropdown-content">
hello world
</div>
</div>
</body>