K
K
Kolya2015-10-08 21:20:07
css
Kolya, 2015-10-08 21:20:07

How to implement such a frame in CSS?

3ac49ff9ebe2499ebc243adc416aa74c.PNG
Good evening, how to make such a frame around the block?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dm, 2015-10-08
@Dev_Kpug

And if you need a transparent background in the header, do three border'аand add two dashes at the top with ::beforeand::after

.block {
  position: relative;
  border-right: 2px solid black;
  border-left: 2px solid black;
  border-bottom: 2px solid black;
}
.block::before,
.block::after {
  position: absolute;
  content: "";
  width: 30px;
  height: 2px;
  top: 0;
  background: black;
}
.block::after {
  left: 0;
}
.block::before {
  right: 0;
}

A
Arthur, 2015-10-09
@r3st1k25

codepen.io/r3st1k25/pen/pjPLxV here are the special tags for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question