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

Distributed monitoring system Zabbix uses SNMP and JMX channels to collect data

In the previous article, we learned about the pas...

Manually implement js SMS verification code input box

Preface This article records a common SMS verific...

In-depth exploration of whether Mysql fuzzy query is case-sensitive

Preface Recently, I have been busy writing a smal...

Linux uses dual network card bond and screwdriver interface

What is bond NIC bond is a technology that is com...

Three uses and differences of MySQL not equal

Judgment symbols are often used in MySQL, and not...

Solution to MySql Error 1698 (28000)

1. Problem description: MysqlERROR1698 (28000) so...

How to use & and nohup in the background of Linux

When we work in a terminal or console, we may not...

Collection of 12 practical web online tools

1. Favicon.cc To create ico icon websites online,...

Summary of Linux vi command knowledge points and usage

Detailed explanation of Linux vi command The vi e...

Master the CSS property display:flow-root declaration in one article

byzhangxinxu from https://www.zhangxinxu.com/word...

js to realize the production method of carousel

This article shares the specific code for js to r...

Nodejs error handling process record

This article takes the connection error ECONNREFU...

Vue-Router installation process and principle detailed

Table of contents 1. Front-end routing implementa...

Summary of Vue's monitoring of keyboard events

Key Modifiers When listening for keyboard events,...