CSS border adds four corners implementation code

CSS border adds four corners implementation code

1.html

<div class="loginbody">
          <div class="border_corner border_corner_left_top"></div>
          <div class="border_corner border_corner_right_top"></div>
          <div class="border_corner border_corner_left_bottom"></div>
          <div class="border_corner border_corner_right_bottom"></div>

     <--other……………………-->
 </div>

2. CSS

.loginbody{
        border: 1px solid #21a7e1;
        box-shadow: 5px 5px 10px 10px rgba(24,68,124,0.4);
        padding-top:20px;
        border-radius: 6px;
        position: relative;
      }

      /*Four corner frames*/
      .border_corner{
        z-index: 2500;
        position: absolute;
        width: 19px;
        height: 19px;
        background: rgba(0,0,0,0);
        border: 4px solid #1fa5f1;
      }
      .border_corner_left_top{
        top: -2px;
        left: -2px;
        border-right: none;
        border-bottom: none;
        border-top-left-radius: 6px;
      }
      .border_corner_right_top{
        top: -2px;
        right: -2px;
        border-left: none;
        border-bottom: none;
        border-top-right-radius: 6px;
      }
      .border_corner_left_bottom{
        bottom: -2px;
        left: -2px;
        border-right: none;
        border-top: none;
        border-bottom-left-radius: 6px;
      }
      .border_corner_right_bottom{
        bottom: -2px;
        right: -2px;
        border-left: none;
        border-top: none;
        border-bottom-right-radius: 6px;
      }

This is the end of this article about adding four corners to CSS borders. For more information about adding four corners to CSS borders, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  Introduction to the pitfalls of Linux high concurrency and performance optimization

>>:  Detailed explanation of Javascript basics loop

Recommend

Analysis of Facebook's Information Architecture

<br />Original: http://uicom.net/blog/?p=762...

Advantages and Problems of XHTML CSS Website Design

XHTML is the standard website design language cur...

Why Seconds_Behind_Master is still 0 when MySQL synchronization delay occurs

Table of contents Problem Description Principle A...

MySQL Basics Quick Start Knowledge Summary (with Mind Map)

Table of contents Preface 1. Basic knowledge of d...

Detailed explanation of Truncate usage in MYSQL

This article guide: There are two ways to delete ...

How to visualize sketched charts in Vue.js using RoughViz

introduce A chart is a graphical representation o...

Detailed explanation on how to modify the default port of nginx

First find out where the configuration file is wh...

JavaScript to implement login slider verification

This article example shares the specific code of ...

Linux lossless expansion method

Overview The cloud platform customer's server...

Installation process of CentOS8 Linux 8.0.1905 (illustration)

As of now, the latest version of CentOS is CentOS...

Detailed explanation of storage engine in MySQL

MySQL storage engine overview What is a storage e...