Example code for drawing double arrows in CSS common styles

Example code for drawing double arrows in CSS common styles

1. Multiple calls to single arrow

Once a single arrow is implemented, it is easy to implement a double arrow. Two principles for implementing a single arrow have been introduced above: border rotation method and double triangle overlay method. This time, we use the border rotation as an example to call multiple times to implement the double arrow.
1. Border rotation single arrow implementation

.arrow-right
  height: 120px;
  width: 30px;
  display :inline-block;
  position: relative;
}
.arrow-right::after {
  content: "";
  height: 60px;
  width: 60px;
  top: 12px;
  border-width: 8px 8px 0 0;
  border-color: blue;
  border-style: solid;
  transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  position: absolute;
}

The effect diagram is as follows:

insert image description here

2. Multiple calls to single arrow

<div>
	<span class="arrow-right"/>
    <span class="arrow-right"/>
</div>

The effect diagram is as follows:

insert image description here

2. Draw double arrows directly by rotating the border

Previously, a single arrow was drawn using the ::after pseudo-element. Now, by adding the ::before pseudo-element and drawing another single arrow, pure CSS can be used to draw a double arrow.

.arrow-right
  height: 120px;
  width: 30px;
  display :inline-block;
  position: relative;
}
.arrow-right::before {
  content: "";
  height: 60px;
  width: 60px;
  top: 12px;
  left: 30px;
  border-width: 8px 8px 0 0;
  border-color: blue;
  border-style: solid;
  transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  position: absolute;
}
.arrow-right::after {
  content: "";
  height: 60px;
  width: 60px;
  top: 12px;
  border-width: 8px 8px 0 0;
  border-color: blue;
  border-style: solid;
  transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  position: absolute;
}

The effect diagram is as follows:

insert image description here

The double triangle overlay method can also directly draw double arrows, but it is more complicated to implement. It is not as easy to implement as the border rotation method.

Summarize

This is the end of this article about the sample code for drawing double arrows in CSS common styles. For more relevant CSS drawing double arrow content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

<<:  Difference between var and let in JavaScript

>>:  Implementation steps for installing FTP server in Ubuntu 14.04

Recommend

Implementation of nacos1.3.0 built with docker

1. Resume nacos database Database name nacos_conf...

The whole process of installing and configuring Harbor1.7 on CentOS7.5

1. Download the required packages wget -P /usr/lo...

An enhanced screenshot and sharing tool for Linux: ScreenCloud

ScreenCloud is a great little app you didn’t even...

JavaScript file loading and blocking issues: performance optimization case study

Let me start with a question: When writing an HTM...

Introduction to Docker Architecture

Docker includes three basic concepts: Image: A Do...

Which scenarios in JavaScript cannot use arrow functions

Table of contents 1. Define object methods 2. Def...

A brief understanding of MySQL storage field type query efficiency

The search performance from fastest to slowest is...

How to solve the mysql ERROR 1045 (28000)-- Access denied for user problem

Problem description (the following discussion is ...

Detailed usage of MYSQL row_number() and over() functions

Syntax format: row_number() over(partition by gro...

Implement a simple search engine based on MySQL

Table of contents Implementing a search engine ba...

How to install rabbitmq-server using yum on centos

Socat needs to be installed before installing rab...

Simple usage of MySQL temporary tables

MySQL temporary tables are very useful when we ne...

Detailed explanation of ES6 Promise usage

Table of contents What is a Promise? Usage of rej...