When I select something with one of the selection tools in Photoshop, an animated streaming black-and-white colored dashed stroke (border) surrounds the selection.
_ _ _ _ _ _ _ _ _ _
| |
| |
| |
|_ _ _ _ _ _ _ _ _ _|
Is there an CSS-only way to recreate this border style?
Perhaps use the below GIF as a stroke’s background image?
I figured this CSS is not possible:
.selected {
border: 1px solid url("selection.gif");
}
I tried a black dashed border on top of a white solid border, however could not find a way to animate or offset somehow.
Update:
I have been made aware of some borders that are dashed and stream. However these are single coloured, and have open ’empty’ spaced gaps between dashes. I’m looking for a Photoshop selection style version:
white dash → black dash → white dash → black dash
Instead of:
Black dash → empty space → black dash → empty space
Like so:
Update 2
This code-pen by mister St.G from Minneapolis comes close, however is a single coloured version with gaps.
2
Answers
What I can infer from your post is that you want to have a dashed border.
Here’s what to do:
You can use this solution and simply just change colors as @chojnicki and @Pablo already have said in comments.