JSON in your Azure SQL Database? Let’s benchmark some options!

Introduction

Storing and retrieving data from JSON fragments is a common need in many application scenarios, like IoT solutions or microservice-based architectures. You can persist these fragments can be in a variety of data stores, from blob or file shares, to relational and non-relational databases, and there’s a long standing debate in the industry on what’s the database technology that fits “better” for this task.

Azure SQL Database offers several options for parsing, transforming and querying JSON data, and this article doesn’t pretend to provide a definitive answer to that debate, but rather to explore these options for common scenarios like data loading and retrieving, and benchmarking results to provide a clear indication of how Azure SQL Database will perform manipulating JSON data.

Our test bench

To reproduce a realistic scenario, we started from a JSON fragment representing a real telemetry message from a machine in a factory floor containing ~60 attributes, for an average 1.6KB size:

We then identified two options for table structures where persist these JSON messages and execute various tests against.

First one is storing plain JSON fragments in a nvarchar(max) column, which is an approach that some customers that don’t want to deal with a relational model tend to adopt:

The second approach we wanted to test is instead “shredding” all attributes of the JSON document into specific columns in a relational table:

Loading data

First scenario we want to test is how efficiently we can load one or many documents generated by an application into these two table structures. In our tests, in order to eliminate all variability related to application implementation and potential latency in database interactions, we dynamically generate various row batches to insert (1, 1000, 10000, 100000, 3M rows) on the server-side, with some random attribute values generated while inserting into our target table through an INSERT…SELECT statement like this:

For the schematized table we’re taking a similar approach to generate our synthetic rowset, but we’re using the OPENJSON function instead to automatically shred all JSON attributes into table columns while again inserting all rows with an INSERT…SELECT statement:

For each table, we then measure loading these row batches with different indexing strategies:

  1. Heap (no clustered index)
  2. Clustered index
  3. Clustered Columnstore (trickle, or individual inserts we wrapped in a BEGIN/COMMIT )
  4. Clustered Columnstore (bulk inserts)

For #3, it’s important to mention the importance of batching multiple individual insert operations and wrap them into an explicit transaction to mitigate both latency between application and database layer, and latency introduced by individual transaction log writes typical of explicit transactions.

This topic has been extensively covered in another article comparing and contrasting all batching options. Having multiple writers can potentially create some concurrency issues that varies depending on the combination of indexing and rows already present in the table: this article is describing in details impact on concurrency and performance for various options.

For Columnstore indexes, for example, each thread loads data exclusively into each rowset by taking a X lock on the rowset, allowing parallel data load with concurrent data load sessions. It’s important to mention though, that in typical IoT scenarios like the one we mentioned, events and messages are typically sent to an event store like Azure IoT Hub or Kafka, and then processed by a relatively small number of event processors that will execute data loading, so concurrency can be less of an issue.

We then repeated our data loading tests with different Azure SQL Database instance sizes, namely Business Critical 2 vCores, 16 vCores or 40 vCores, to verify if increasing “Max log rate” limit for the instance is impacting data loading performance.

Loading times for all options are represented in the following matrix:

Cells with green background represents best loading times for different batch sizes in each scale tier. As we can see, bulk loading plain JSON into a Clustered Columnstore index is around 3x faster than the schematized approach we tested, across pretty much all batch sizes.

Comparing various indexing strategies on the two data models instead, differences in bulk loading on an heap, clustered index on row store or clustered columnstore is much more limited, in the range of 20-30% difference.

It’s also interesting to see the level of compression that can be achieved for both plain JSON and for the schematized approach by leveraging Clustered Columnstore (from ~5GB down to 204MB and 122MB respectively). In IoT scenarios where you have to store billions of messages per month, this can be a significant cost saving compared to many other database technologies.

Scaling from 2 vCores to 40 vCores is only providing ~20% performance improvement as, for this particular test, we’re executing bulk loading on a single connection and we’re not maxing out resource consumption in any particular area (CPU, IO or memory). If we would execute multiple bulk loading operation in parallel across many connections, we would clearly see a different picture here.

#azure sql #developers #json #azure #sql

What is GEEK

Buddha Community

JSON in your Azure SQL Database? Let’s benchmark some options!

Como criar botões de rádio personalizados incríveis usando apenas HTML e CSS

Neste guia, você aprenderá como criar botões de rádio personalizados incríveis usando apenas HTML e CSS. Para criar botões de rádio personalizados incríveis usando apenas HTML e CSS. Primeiro, você precisa criar dois arquivos, um arquivo HTML e outro arquivo CSS.

1: Primeiro, crie um arquivo HTML com o nome de index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Radio Buttons | Codequs</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="wrapper">
    <div class="title">Select your option</div>
    <div class="box">
      <input type="radio" name="select" id="option-1">
      <input type="radio" name="select" id="option-2">
      <input type="radio" name="select" id="option-3">
      <input type="radio" name="select" id="option-4">
      <label for="option-1" class="option-1">
        <div class="dot"></div>
        <div class="text">Gamer</div>
      </label>
      <label for="option-2" class="option-2">
        <div class="dot"></div>
        <div class="text">YouTuber</div>
      </label>
      <label for="option-3" class="option-3">
        <div class="dot"></div>
        <div class="text">Student</div>
      </label>
      <label for="option-4" class="option-4">
        <div class="dot"></div>
        <div class="text">Developer</div>
      </label>
    </div>
  </div>

</body>
</html>

2: Em segundo lugar, crie um arquivo CSS com o nome de style.css

 

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
  display: grid;
  height: 100%;
  place-items: center;
}
.wrapper{
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.2);
}
.wrapper .title{
  color: #fff;
  line-height: 65px;
  text-align: center;
  background: #333;
  font-size: 25px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.wrapper .box{
  padding: 20px 30px;
  background: #fff;
  border-radius: 10px;
}
.wrapper .box label{
  display: flex;
  height: 53px;
  width: 100%;
  align-items: center;
  border: 1px solid lightgrey;
  border-radius: 50px;
  margin: 10px 0;
  padding-left: 20px;
  cursor: default;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1,
#option-2:checked ~ .option-2,
#option-3:checked ~ .option-3,
#option-4:checked ~ .option-4{
  background: #333;
  border-color: #333;
}
.wrapper .box label .dot{
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot,
#option-2:checked ~ .option-2 .dot,
#option-3:checked ~ .option-3 .dot,
#option-4:checked ~ .option-4 .dot{
  background: #fff;
}
.box label .dot::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot::before,
#option-2:checked ~ .option-2 .dot::before,
#option-3:checked ~ .option-3 .dot::before,
#option-4:checked ~ .option-4 .dot::before{
  background: #333;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper .box label .text{
  color: #333;
  font-size: 18px;
  font-weight: 400;
  padding-left: 10px;
  transition: color 0.3s ease;
}
#option-1:checked ~ .option-1 .text,
#option-2:checked ~ .option-2 .text,
#option-3:checked ~ .option-3 .text,
#option-4:checked ~ .option-4 .text{
  color: #fff;
}
.wrapper .box input[type="radio"]{
  display: none;
}

Agora você criou com sucesso botões de rádio personalizados incríveis usando apenas HTML e CSS.

So erstellen Sie fantastische benutzerdefinierte Optionsfelder nur mit HTML und CSS

In diesem Leitfaden erfahren Sie, wie Sie fantastische benutzerdefinierte Optionsfelder nur mit HTML und CSS erstellen. Um fantastische benutzerdefinierte Optionsfelder nur mit HTML und CSS zu erstellen. Zuerst müssen Sie zwei Dateien erstellen, eine HTML-Datei und eine CSS-Datei.

1: Erstellen Sie zunächst eine HTML-Datei mit dem Namen index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Radio Buttons | Codequs</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="wrapper">
    <div class="title">Select your option</div>
    <div class="box">
      <input type="radio" name="select" id="option-1">
      <input type="radio" name="select" id="option-2">
      <input type="radio" name="select" id="option-3">
      <input type="radio" name="select" id="option-4">
      <label for="option-1" class="option-1">
        <div class="dot"></div>
        <div class="text">Gamer</div>
      </label>
      <label for="option-2" class="option-2">
        <div class="dot"></div>
        <div class="text">YouTuber</div>
      </label>
      <label for="option-3" class="option-3">
        <div class="dot"></div>
        <div class="text">Student</div>
      </label>
      <label for="option-4" class="option-4">
        <div class="dot"></div>
        <div class="text">Developer</div>
      </label>
    </div>
  </div>

</body>
</html>

2: Zweitens erstellen Sie eine CSS-Datei mit dem Namen style.css

 

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
  display: grid;
  height: 100%;
  place-items: center;
}
.wrapper{
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.2);
}
.wrapper .title{
  color: #fff;
  line-height: 65px;
  text-align: center;
  background: #333;
  font-size: 25px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.wrapper .box{
  padding: 20px 30px;
  background: #fff;
  border-radius: 10px;
}
.wrapper .box label{
  display: flex;
  height: 53px;
  width: 100%;
  align-items: center;
  border: 1px solid lightgrey;
  border-radius: 50px;
  margin: 10px 0;
  padding-left: 20px;
  cursor: default;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1,
#option-2:checked ~ .option-2,
#option-3:checked ~ .option-3,
#option-4:checked ~ .option-4{
  background: #333;
  border-color: #333;
}
.wrapper .box label .dot{
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot,
#option-2:checked ~ .option-2 .dot,
#option-3:checked ~ .option-3 .dot,
#option-4:checked ~ .option-4 .dot{
  background: #fff;
}
.box label .dot::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot::before,
#option-2:checked ~ .option-2 .dot::before,
#option-3:checked ~ .option-3 .dot::before,
#option-4:checked ~ .option-4 .dot::before{
  background: #333;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper .box label .text{
  color: #333;
  font-size: 18px;
  font-weight: 400;
  padding-left: 10px;
  transition: color 0.3s ease;
}
#option-1:checked ~ .option-1 .text,
#option-2:checked ~ .option-2 .text,
#option-3:checked ~ .option-3 .text,
#option-4:checked ~ .option-4 .text{
  color: #fff;
}
.wrapper .box input[type="radio"]{
  display: none;
}

Jetzt haben Sie erfolgreich fantastische benutzerdefinierte Optionsfelder nur mit HTML und CSS erstellt.

Comment créer des boutons radio personnalisés impressionnants en utilisant uniquement HTML et CSS

Dans ce guide, vous apprendrez à créer des boutons radio personnalisés impressionnants en utilisant uniquement HTML et CSS. Pour créer des boutons radio personnalisés impressionnants en utilisant uniquement HTML et CSS. Tout d'abord, vous devez créer deux fichiers, un fichier HTML et un autre fichier CSS.

1 : Tout d'abord, créez un fichier HTML avec le nom de index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Radio Buttons | Codequs</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="wrapper">
    <div class="title">Select your option</div>
    <div class="box">
      <input type="radio" name="select" id="option-1">
      <input type="radio" name="select" id="option-2">
      <input type="radio" name="select" id="option-3">
      <input type="radio" name="select" id="option-4">
      <label for="option-1" class="option-1">
        <div class="dot"></div>
        <div class="text">Gamer</div>
      </label>
      <label for="option-2" class="option-2">
        <div class="dot"></div>
        <div class="text">YouTuber</div>
      </label>
      <label for="option-3" class="option-3">
        <div class="dot"></div>
        <div class="text">Student</div>
      </label>
      <label for="option-4" class="option-4">
        <div class="dot"></div>
        <div class="text">Developer</div>
      </label>
    </div>
  </div>

</body>
</html>

2 : Deuxièmement, créez un fichier CSS avec le nom de style.css

 

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
  display: grid;
  height: 100%;
  place-items: center;
}
.wrapper{
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.2);
}
.wrapper .title{
  color: #fff;
  line-height: 65px;
  text-align: center;
  background: #333;
  font-size: 25px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.wrapper .box{
  padding: 20px 30px;
  background: #fff;
  border-radius: 10px;
}
.wrapper .box label{
  display: flex;
  height: 53px;
  width: 100%;
  align-items: center;
  border: 1px solid lightgrey;
  border-radius: 50px;
  margin: 10px 0;
  padding-left: 20px;
  cursor: default;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1,
#option-2:checked ~ .option-2,
#option-3:checked ~ .option-3,
#option-4:checked ~ .option-4{
  background: #333;
  border-color: #333;
}
.wrapper .box label .dot{
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot,
#option-2:checked ~ .option-2 .dot,
#option-3:checked ~ .option-3 .dot,
#option-4:checked ~ .option-4 .dot{
  background: #fff;
}
.box label .dot::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot::before,
#option-2:checked ~ .option-2 .dot::before,
#option-3:checked ~ .option-3 .dot::before,
#option-4:checked ~ .option-4 .dot::before{
  background: #333;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper .box label .text{
  color: #333;
  font-size: 18px;
  font-weight: 400;
  padding-left: 10px;
  transition: color 0.3s ease;
}
#option-1:checked ~ .option-1 .text,
#option-2:checked ~ .option-2 .text,
#option-3:checked ~ .option-3 .text,
#option-4:checked ~ .option-4 .text{
  color: #fff;
}
.wrapper .box input[type="radio"]{
  display: none;
}

Vous avez maintenant créé avec succès des boutons radio personnalisés impressionnants en utilisant uniquement HTML et CSS.

中條 美冬

1655723340

HTMLとCSSのみを使用して素晴らしいカスタムラジオボタンを作成する方法

このガイドでは、HTMLとCSSのみを使用して素晴らしいカスタムラジオボタンを作成する方法を学習します。HTMLとCSSのみを使用して素晴らしいカスタムラジオボタンを作成します。まず、2つのファイルを作成する必要があります。1つはHTMLファイルで、もう1つはCSSファイルです。

1:まず、index.htmlという名前のHTMLファイルを作成します

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Radio Buttons | Codequs</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="wrapper">
    <div class="title">Select your option</div>
    <div class="box">
      <input type="radio" name="select" id="option-1">
      <input type="radio" name="select" id="option-2">
      <input type="radio" name="select" id="option-3">
      <input type="radio" name="select" id="option-4">
      <label for="option-1" class="option-1">
        <div class="dot"></div>
        <div class="text">Gamer</div>
      </label>
      <label for="option-2" class="option-2">
        <div class="dot"></div>
        <div class="text">YouTuber</div>
      </label>
      <label for="option-3" class="option-3">
        <div class="dot"></div>
        <div class="text">Student</div>
      </label>
      <label for="option-4" class="option-4">
        <div class="dot"></div>
        <div class="text">Developer</div>
      </label>
    </div>
  </div>

</body>
</html>

2:次に、style.cssという名前のCSSファイルを作成します

 

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
  display: grid;
  height: 100%;
  place-items: center;
}
.wrapper{
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.2);
}
.wrapper .title{
  color: #fff;
  line-height: 65px;
  text-align: center;
  background: #333;
  font-size: 25px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.wrapper .box{
  padding: 20px 30px;
  background: #fff;
  border-radius: 10px;
}
.wrapper .box label{
  display: flex;
  height: 53px;
  width: 100%;
  align-items: center;
  border: 1px solid lightgrey;
  border-radius: 50px;
  margin: 10px 0;
  padding-left: 20px;
  cursor: default;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1,
#option-2:checked ~ .option-2,
#option-3:checked ~ .option-3,
#option-4:checked ~ .option-4{
  background: #333;
  border-color: #333;
}
.wrapper .box label .dot{
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot,
#option-2:checked ~ .option-2 .dot,
#option-3:checked ~ .option-3 .dot,
#option-4:checked ~ .option-4 .dot{
  background: #fff;
}
.box label .dot::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot::before,
#option-2:checked ~ .option-2 .dot::before,
#option-3:checked ~ .option-3 .dot::before,
#option-4:checked ~ .option-4 .dot::before{
  background: #333;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper .box label .text{
  color: #333;
  font-size: 18px;
  font-weight: 400;
  padding-left: 10px;
  transition: color 0.3s ease;
}
#option-1:checked ~ .option-1 .text,
#option-2:checked ~ .option-2 .text,
#option-3:checked ~ .option-3 .text,
#option-4:checked ~ .option-4 .text{
  color: #fff;
}
.wrapper .box input[type="radio"]{
  display: none;
}

これで、HTMLとCSSのみを使用して素晴らしいカスタムラジオボタンを正常に作成できました。

Shubham Ankit

Shubham Ankit

1655711983

How to Create Awesome Custom Radio Buttons using only HTML & CSS

In this guide, you’ll learn how to create Awesome Custom Radio Buttons using only HTML & CSS. To create Awesome Custom Radio Buttons using only HTML & CSS. First, you need to create two Files one HTML File and another one is CSS File.

Subscribe: https://www.youtube.com/@CodingNepal/featured 

Source Code:

1: First, create an HTML file with the name of index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Radio Buttons</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="wrapper">
    <div class="title">Select your option</div>
    <div class="box">
      <input type="radio" name="select" id="option-1">
      <input type="radio" name="select" id="option-2">
      <input type="radio" name="select" id="option-3">
      <input type="radio" name="select" id="option-4">
      <label for="option-1" class="option-1">
        <div class="dot"></div>
        <div class="text">Gamer</div>
      </label>
      <label for="option-2" class="option-2">
        <div class="dot"></div>
        <div class="text">YouTuber</div>
      </label>
      <label for="option-3" class="option-3">
        <div class="dot"></div>
        <div class="text">Student</div>
      </label>
      <label for="option-4" class="option-4">
        <div class="dot"></div>
        <div class="text">Developer</div>
      </label>
    </div>
  </div>

</body>
</html>

2: Second, create a CSS file with the name of style.css

 

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
  display: grid;
  height: 100%;
  place-items: center;
}
.wrapper{
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.2);
}
.wrapper .title{
  color: #fff;
  line-height: 65px;
  text-align: center;
  background: #333;
  font-size: 25px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.wrapper .box{
  padding: 20px 30px;
  background: #fff;
  border-radius: 10px;
}
.wrapper .box label{
  display: flex;
  height: 53px;
  width: 100%;
  align-items: center;
  border: 1px solid lightgrey;
  border-radius: 50px;
  margin: 10px 0;
  padding-left: 20px;
  cursor: default;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1,
#option-2:checked ~ .option-2,
#option-3:checked ~ .option-3,
#option-4:checked ~ .option-4{
  background: #333;
  border-color: #333;
}
.wrapper .box label .dot{
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot,
#option-2:checked ~ .option-2 .dot,
#option-3:checked ~ .option-3 .dot,
#option-4:checked ~ .option-4 .dot{
  background: #fff;
}
.box label .dot::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
#option-1:checked ~ .option-1 .dot::before,
#option-2:checked ~ .option-2 .dot::before,
#option-3:checked ~ .option-3 .dot::before,
#option-4:checked ~ .option-4 .dot::before{
  background: #333;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper .box label .text{
  color: #333;
  font-size: 18px;
  font-weight: 400;
  padding-left: 10px;
  transition: color 0.3s ease;
}
#option-1:checked ~ .option-1 .text,
#option-2:checked ~ .option-2 .text,
#option-3:checked ~ .option-3 .text,
#option-4:checked ~ .option-4 .text{
  color: #fff;
}
.wrapper .box input[type="radio"]{
  display: none;
}

Now you’ve successfully created Awesome Custom Radio Buttons using only HTML & CSS.

#html #css