Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



  <meta charset="utf-8">
  <title>ROG Strix Wireless</title>

  <link href=",400,700" rel="stylesheet">


  <div class="wrapper">
    <div id="bag__cart" style="display:flex;align-items:center;justify-content: space-around;padding:19px;width: 300px; height: 100px; background-color: #1d1d1f; position: absolute; right: 10px; border-radius: 0px 0px 15px 15px;box-shadow: 5px 5px 30px 5px #1d1d1fd9;text-align:center;"><img src="" style="width:36px;height:auto;">
      <div class="bag__title" style="color:white;">1 x ROG Strix Wireless</div>
      <div id="bag__delete" style="color:white;font-size:30px;border:0.4px solid white;padding:0px 5px;;border-radius:10%;">-</div>
      <div id="bag__add" style="color:white;font-size:30px;border:0.4px solid white;padding:0px 5px;border-radius:10%;">+</div>
    <div class="card">
      <div class="card__header card__header__airpodsmax">
        <div class="card__watermark"></div>

        <img src="" alt="AIRPODS MAX" class="card__logo">

        <span class="card__price">$600</span>

        <h1 class="card__title">ROG Strix Wireless</h1>
        <span class="card__subtitle">Помимо высокого качества звука гарнитура ROG Strix Wireless может похвастать прекрасными эргономическими характеристиками.</span>


      <div class="card__body">
        <img src="" alt="AIRPODS_MAX" class="card__image">
        <div class="card__buy card__buy__airpodsmax" id="logo">Купить</div>

        <span class="card__buy__subtitle">Элегантный дизайн и полный комфорт</span>

  <div>Все права на изображения и текст принадлежат <a href=""></a> и использованы здесь в обучающих целях</div>



body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;

  font-family: "Roboto", "Helvetica", sans-serif;

  background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(0, 0, 0, 0.15) 100%
        at top center,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(0, 0, 0, 0.4) 120%
  background-blend-mode: multiply, multiply;
  color: #1d1d1f;

.wrapper {
  position: relative;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
  display: flex;

  justify-content: center;

.card {
  display: block;
  position: absolute;
  top: 25px;
  margin: 0 auto;
  width: 350px;
  background-color: #1d1d1f;
  border-radius: 15px;

  box-shadow: 5px 5px 30px 5px #1d1d1fd9;

.card__header {
  position: relative;
  height: 170px;
  padding: 30px 30px 260px;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
  color: #1d1d1f;

.card__header__airpodsmax {
  background-color: #00dbde;
  background-image: linear-gradient(135deg, #00dbde 0%, #fc00ff 100%);

.card__watermark {
  overflow: hidden;
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;

.card__watermark::after {
  content: "STRIX";
  position: relative;
  left: -20px;
  color: rgba(0, 0, 0, 0.3);
  font-size: 260px;
  font-weight: 700;
  text-transform: uppercase;

.card__logo {
  width: 36px;
  height: auto;
  margin-top: -10px;

.card__price {
  float: right;
  font-size: 16px;
  font-weight: 300;

.card__title {
  text-align: center;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.1em;
  text-transform: uppercase;
  letter-spacing: 1.5px;

.card__subtitle {
  display: block;
  font-size: 13px;
  text-align: center;
  font-weight: 300;

.card__body {
  position: relative;
  padding: 40px 30px 20px;

.card__image {
  z-index: 1;
  position: absolute;
  top: -319px;
  left: -90px;
  width: 130%;

.card__buy {
  display: block;
  width: 50%;
  margin: 0 auto 15px;
  padding: 15px;
  border: 2px solid #fff;
  border-radius: 20px;
  text-align: center;
  text-transform: uppercase;
  font-size: 14px;

.card__buy__airpodsmax {
  color: #00dbde;
  border-color: #00dbde;

.card__buy__subtitle {
  display: block;
  font-size: 12px;
  color: #aeaeae;
  text-transform: uppercase;
  text-align: center;



                var buy = document.querySelector(".card__buy");
buy.addEventListener("click", addBagPosition);
bagVisibility = false;

var bagCart = document.querySelector("#bag__cart"); = "hidden";
function visibleBag() {
  if ((bagVisibility = true)) { = "visible";
  } else { = "hidden";
buy.addEventListener("click", visibleBag);
var contentdiv = document.querySelector(".wrapper");
var bagDelete = document.querySelector("#bag__delete");
bagDelete.addEventListener("click", deleteBagPosition);
var countBag = 0;
function deleteBagPosition() {
  var bagTitle = document.querySelector(".bag__title");

  if (countBag > 1) {
    countBag = countBag - 1;

    bagTitle.innerHTML = countBag + " x ROG Strix Wireless";
  } else {
    countBag = 0;
    bagTitle.innerHTML = "Добавьте наушники";

var bagAdd = document.querySelector("#bag__add");
bagAdd.addEventListener("click", addBagPosition);
function addBagPosition() {
  var bagTitle = document.querySelector(".bag__title");
  if (countBag >= 0) {
    countBag = countBag + 1;
    bagTitle.innerHTML = countBag + " x ROG Strix Wireless";
function addcart() {
  var cartdiv = document.createElement("div");*/

  /* = "100px"; = "100px"; = "orange"; = "absolute"; = "10px";
  cartdiv.innerHTML = "!";
    '<div style="width: 100px; height: 100px; background-color: orange; position: absolute; right: 10px; border-bottom-radius: 15px;">!</div>'