Flackern am rechten Rand der SchaltflächeHTML

HTML-Programmierer
Anonymous
 Flackern am rechten Rand der Schaltfläche

Post by Anonymous »

Wenn Sie den Cursor nahe an den rechten Rand von „Projekte“ bewegen, beginnt er zu flackern.

Code: Select all

:root {
--light-gray: #979797;
--dark-gray: #3D3D3D;
--orange: #ff8400;
--gray: #808080;
}

html, body {
height: 100%;
margin: 0;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}

li, .nav_links a, button {
font-family: "Montserrat", sans-serif;
font-weight: 600;
font-size: large;
text-decoration: none;
color: #edf0f1;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 6%;
background: #000 url(bg.webp) repeat 0 0;
color: #edf0f1;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: large;
position: sticky;
top: 0;
z-index: 1000;
border-bottom: 2px solid var(--orange);
padding-left: 6%;
}

.header nav {
flex-grow: 1;
text-align: center;
}

a {
color: white;
}

.nav_links {
list-style: none;
color: white;
display: flex;
justify-content: center;
position: relative;
}

.nav_links li {
display: inline-block;
padding: 0 20px;
color: white;
}

.nav_links li a:hover {
color: var(--orange);
}

.buttons_home {
display: flex;
justify-content: center;
gap: 5%;
margin-top: 10%;
width: 100%;
list-style: none;
padding: 0;
}

.buttons_home li {
width: 27%;
}

.home_button {
background-color: transparent;
color: white;
border: 2px solid white;
padding: 20% 10%;
cursor: pointer;
font-family: "Montserrat", sans-serif;
font-weight: 600;
font-size: 125%;
text-decoration: none;
display: block;
text-align: center;
}

.home_button:hover {
background-color: transparent;
border: 2px solid var(--orange);
color: white;
}

.nav_links li a.active {
color: var(--orange);
}

.container {
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}

.content {
padding: 20px;
display: flex;
flex-direction: column;
background: #000 url(bg.webp) repeat 0 0;
flex-grow: 1;
}

.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
background: #000 url(bg.webp) repeat 0 0;
color: #edf0f1;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: medium;
border-top: 2px solid var(--orange);
position: relative;
}

.footer p {
margin: 0;
position: absolute;
left: 50%;
transform: translateX(-50%);
}

/* Project dropdown */
.dropdown {
position: relative;
}

.project_menu {
display: none;
top: 100%;
left: 0;
background-color: #000;
border: 2px solid var(--orange);
list-style: none;
padding: 0;
margin: 0;
width: 100%;
}

.project_menu li {
padding: 10px 20px;
}

.project_menu li a {
color: white;
text-decoration: none;
}

.project_menu li a:hover {
color: var(--orange);
}

.project_menu:hover {
border: 2px solid white;
}

.dropdown:hover .project_menu {
display: block;
border-top:  none;
}

Code: Select all





[*]




[list]
[url=about.html]About[/url]
[*][url=resume.html]Resume[/url]

[*]
[url=#]Projects[/url]

[url=projects.html]Kalkulacka[/url]
[*][url=projects.html]Projekt2[/url]
[*][url=projects.html]Projekt3[/url]
[/list]



© 2024




Code: Select all

:root {
--light-gray: #979797;
--dark-gray: #3D3D3D;
--orange: #ff8400;
--gray: #808080;
}

html, body {
height: 100%;
margin: 0;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}

li, .nav_links a, button {
font-family: "Montserrat", sans-serif;
font-weight: 600;
font-size: large;
text-decoration: none;
color: #edf0f1;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 6%;
background: #000 url(bg.webp) repeat 0 0;
color: #edf0f1;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: large;
position: sticky;
top: 0;
z-index: 1000;
border-bottom: 2px solid var(--orange);
padding-left: 6%;
}

.header nav {
flex-grow: 1;
text-align: center;
}

a {
color: white;
}

.nav_links {
list-style: none;
color: white;
display: flex;
justify-content: center;
position: relative;
}

.nav_links li {
display: inline-block;
padding: 0 20px;
color: white;
}

.nav_links li a:hover {
color: var(--orange);
}

.buttons_home {
display: flex;
justify-content: center;
gap: 5%;
margin-top: 10%;
width: 100%;
list-style: none;
padding: 0;
}

.buttons_home li {
width: 27%;
}

.home_button {
background-color: transparent;
color: white;
border: 2px solid white;
padding: 20% 10%;
cursor: pointer;
font-family: "Montserrat", sans-serif;
font-weight: 600;
font-size: 125%;
text-decoration: none;
display: block;
text-align: center;
}

.home_button:hover {
background-color: transparent;
border: 2px solid var(--orange);
color: white;
}

.nav_links li a.active {
color: var(--orange);
}

.container {
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}

.content {
padding: 20px;
display: flex;
flex-direction: column;
background: #000 url(bg.webp) repeat 0 0;
flex-grow: 1;
}

.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
background: #000 url(bg.webp) repeat 0 0;
color: #edf0f1;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: medium;
border-top: 2px solid var(--orange);
position: relative;
}

.footer p {
margin: 0;
position: absolute;
left: 50%;
transform: translateX(-50%);
}

/* Project dropdown */
.dropdown {
position: relative;
}

.project_menu {
display: none;
top: 100%;
left:  0;
background-color: #000;
border: 2px solid var(--orange);
list-style: none;
padding: 0;
margin: 0;
width: 100%;
}

.project_menu li {
padding: 10px 20px;
}

.project_menu li a {
color: white;
text-decoration: none;
}

.project_menu li a:hover {
color: var(--orange);
}

.project_menu:hover {
border: 2px solid white;
}

.dropdown:hover .project_menu {
display: block;
border-top: none;
}
https://jsfiddle.net/Matko223/opkd963x/15/
Ich habe versucht, die Breite und Position des Dropdown-Menüs zu ändern, konnte es aber nicht herausfinden.
Aus irgendeinem Grund ist das Dropdown-Menü länger als die Schaltfläche „Projekte“, daher verbindet sich der Rahmen nicht richtig.

Code: Select all

.project_menu {
display: none;
position: absolute;
top: calc(100% - 2px);
left: -2px;
background-color: transparent;
border: 2px solid var(--orange);
z-index: 1;
list-style: none;
padding: 0;
margin: 0;
width: calc(100% + 4px);
}
So sollte es aussehen, nachdem Sie mit der Maus über die Schaltfläche „Projekte“ gefahren sind:
Image

Video (Bildschirmrekorder würde es nicht aufzeichnen):

Es ist noch schlimmer, wenn ich es auf der Live Server-Erweiterung teste.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post