Jump to content
  • 0

Как сверстать такую стрелку?


yaparoff
 Share

Question

4 answers to this question

Recommended Posts

  • 1
<div class="var1"></div>
<div class="var2"></div>
<div class="var3"></div>

.var1{
  position: relative;
  height: 40px;
  width: 15px;
  display: inline-block;
}
.var1:after, .var1:before{
  content: '';
  display: block;
  background: #000;
  position: absolute;
  height: 2px;
  width: 23px;
  transform-origin: 0 50%;
  top: 50%;
}
.var1:before{
  transform: rotate(-60deg);
}
.var1:after{
  transform: rotate(60deg);
}
.var2{
  display: inline-block;
  position: relative;
  height: 40px;
  width: 15px;
  overflow: hidden;
}
.var2:after{
  position: absolute;
  top: 50%;
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  border: 2px solid #000;
  border-top: none;
  border-right: none;
  transform-origin: 0 100% ;
  transform: translateY(-100%) rotate(60deg) skew(30deg);
}
.var3{
  display: inline-block;
  height: 22px;
  width: 20px;
  border: 2px solid #000;
  border-top: none;
  border-right: none;
  transform:rotate(30deg) skewY(30deg)
}

 

  • Like 1
Link to comment
Share on other sites

  • 0
В 04.07.2018 в 12:28, Switch74 сказал:

Задумка хорошая, но если изменить цвет бэкграунда, то стрелка станет не такой http://skrinshoter.ru/s/050718/HWdnmBMq?a
Мне нужно как то в не зависимости от бэкграунда

Edited by yaparoff
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy