我需要为这个"形状"添加边框.这有点困难,因为形状是由伪元素之后和之前制作的.我找不到正确的方法.
我需要实现的目标:
我到目前为止的代码:
https://jsfiddle.net/jimmyadaro/xfcjfz3d/
#octagon {
width: 300px;
height: 200px;
background: red;
position: relative;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
display: block;
}
#octagon:before,
#octagon:after {
content: "";
position: absolute;
left: 0;
right: 0;
}
#octagon:before {
top: 0;
border-bottom: 30px solid red;
border-left: 30px solid #fff;
border-right: 30px solid #fff;
}
#octagon:after {
bottom: 0;
border-top: 30px solid red;
border-left: 30px solid #fff;
border-right: 30px solid #fff;
}
<div id="octagon"></div>
Run Code Online (Sandbox Code Playgroud)
我尝试了阴影和轮廓但没有成功.
谢谢阅读.
注意:如果重要的话,我会使用纯色背景色.
我正在使用macOS,创建一个Bash脚本。
我将这些文件放在某个/path/to/inc/文件夹中:
./lorem-ipsum.php
./dolor-sit.amet.php
./config-prod.php
./enqueue.php
./config.php
./setup.php
./config-uat.php
./config-some-other-thing.php
Run Code Online (Sandbox Code Playgroud)
现在,我想有这些文件config*.php的名称,并删除他们除了命名一个config-prod.php,所以该文件夹最终看起来是这样的:
./lorem-ipsum.php
./dolor-sit.amet.php #Still here
./config-prod.php
./enqueue.php
./config.php #Removed
./setup.php
./config-uat.php #Removed
./config-some-other-thing.php #Removed
Run Code Online (Sandbox Code Playgroud)
有什么办法可以使用find或类似的方法吗?