Wie bekomme ich das in CSS hin?

Code:
<!DOCTYPE html>
<html>
<head>
<style>
#grad {
    height: 200px;
    background: repeating-linear-gradient(135deg, #434343 1px, #212121 1.5px);  
    color: #ffffff;
}

#content {
  position: relative;
  float: left;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

</style>
</head>
<body>


<div id="grad">  <h2 id="content">Hello World!</h2> </div>


</body>
</html>
 
Zuletzt bearbeitet:
Zurück
Oben