Webentwicklung – die besten Beiträge

Java Script wird nicht ausgeführt?

hallo, und zwar wird bei mir nicht Java Script ausgeführt. Könnt ihr mir helfen woran dass liegt???

HTML:

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Quiz Wuiz</title>

<link rel="stylesheet" href="/quiz.css">

</head>

<body>

  <img src="/logo.png" alt="img" id="img" class="img">

  <h1 id="title">Today's Quiz</h1>

  <div id="quiz-container">

    <div class="questions">

      <h2 id="question"></h2>

      <ol type="A">

        <li class="option"><span id="option0" onclick="calcScore(this)"></span></li>

        <li class="option"><span id="option1" onclick="calcScore(this)"></span></li>

        <li class="option"><span id="option2" onclick="calcScore(this)"></span></li>

        <li class="option"><span id="option3" onclick="calcScore(this)"></span></li>

      </ol>

      <h4 id="stat"></h4>

    </div>

    <div class="buttons">

      <button type="button" class="next">Next</button>

    </div>

  </div>

  <!-- scoreboard section -->

  <div id="scoreboard">

    <img src="/logo.png" alt="">

    <h2 id="score-title">Your Score</h2>

    <h2 id="score"></h2>

    <button type="button" id="score-btn" onclick="backToQuiz()">Back to Quiz</button>

    <button type="button" id="check-answer" onclick="checkAnswer()">Check Answers</button>

  </div>

  

  <div id="answerBank">

    <h2>Answers :</h2>

    <ol type="1" id="answers">

    </ol>

    <button type="button" id="score-btn" onclick="backToQuiz()">Back to Quiz</button>

  </div>

  

  <script src="/quiz.js"></script>

</body>

</html>

JAVA SCRIPT:

Bild zum Beitrag
HTML, Webseite, JavaScript, HTML5, Informatik, Programmiersprache, Webentwicklung, Frontend

HTML gradient in nav bar?

Hallo, ich versuche vergebens eine nav bar zu bauen, welche durch hovern einen gradient freigibt, nicht hinter jedem linkblock soll ein gradient sein, sondern ein 'grosser' hinter allen zsm. Mein ansatz ist bis jetzt dies:

<!DOCTYPE html>
<html lang="de">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>G&M Barber</title>
  </head>
  <body>
   
        <ul>
            <li><a href="barber.html">Home</a></li>
            <li><a href="barber.html">News</a></li>
            <li><a href="barber.html">Contact</a></li>
            <li><a href="barber.html">About</a></li>
            
        </ul> 
    
</body>
</html>

css:

body {
    background-color: black;
  }
  
  ul {
  background: linear-gradient(90deg, rgba(0, 3, 36, 1) 0%, rgba(121, 9, 118, 1) 47%, rgba(56, 134, 188, 1) 100%);    border-radius: 12px;
    overflow: hidden;
    display: table;
    margin: 0 auto;
    padding: 0;
  }
  
  li {
    display: inline-block;
  }
  
  li a {
    display: block;
    color: rgb(255, 255, 255);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    background: black;
  }
  
  li a:hover {
    background: transparent;
  }

  jedoch sind die Abstände zwischen den li 'boxen' auch gefärbt, wie ändere ich das, oder wie gehe ich das schlauer an?

Vielen Dank schon mal

HTML, Webseite, CSS, HTML5, Programmiersprache, Webdesign, Webentwicklung

Meistgelesene Beiträge zum Thema Webentwicklung