在用 antv 的 modal 对话框时,你会发现弹出来的框有一个很大的边框,打开 css 会找到 ant-modal-content 这个 class。如果你直接 加这个样式 padding: 0,或者 :deep(.ant-modal-content){padding: 0 }你会发现都不起作用
即使,即使你用了 important 也还是不起作用
这时候 看浏览器工具栏的右侧,会有类似 :where(xxxx) .ant-modal-content 这样的样式,也就是说他本身就是一个伪类,如果你直接对它操作是不起作用的。
网上找了很多资料。最后找到说,其实他有一个 wrap-class-name 的属性。用了这个属性后,整个对话框里的样式就可以跟着这个外层类走了。因此设定:<a-modal wrap-class-name="wrap-modal" ></a-modal>
再添加样式:
XML/HTML代码
- .wrap-modal{
- .ant-modal-content{
- padding: 0!important;
- }
- }
再次看弹窗。一切正常啦 ~
一般来说象这种效果实现还是比较有意思的
在文字下层加上一定高度的背景色,半透明,而且模糊。。。
话不多说,上代码:
CSS代码
- .text_bg {
- display: inline-block;
- position: relative;
- z-index: 1;
- }
-
- .text_bg::after {
- content: '';
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 40%;
- background-color: #B6D16F;
- opacity: .7;
- z-index: -1;
- filter: blur(1px);
- }
上述代码中最重要的其实就是那两个z-index。否则你会发现背景色其实压在了文字上方。
其他的基本上都是基本操作,只是额外用了一个:after的伪类。在当前这个例子里。用before和after的最终显示效果其实是一样的
用unoconv将wod转成pdf的时候,中文乱码,这时候解决方案往往是上传中文字体到系统库并注册即可。
中文字体网上下载的地方一堆堆的,就不再赘叙了。
主要就是注册 ,因为用到了mkfontscale之类的命令。但这不是系统自带的,需要安装,因为我用debian。于是:
XML/HTML代码
- # 使mkfontscale和mkfontdir命令正常运行
- sudo apt-get install ttf-mscorefonts-installer
- # 使fc-cache命令正常运行
- sudo apt-get install fontconfig
然后在相应的字体目录下运行
mkfontscale
mkfontdir
fc-cache -fv //更新字体缓存
fc-list :lang-zh
然后一切正常
之前还在说用了CF后,连垃圾评论都没了。
结果,一通电话过来。说如果你再用CF,把IP指在国外,就直接取消备案了。然而CF国内版又用不起,也看了一下怎么个国内加速,还是有点繁琐,所以还是先暂时禁用吧。
其实用CF做代理的时候 ,还能享受直接https,现在我还得自己再配https。真烦人
而且,又开始收到垃圾评论了。
忍忍吧
在尝试使用 envoy 尝试自动部署的时候,遇到了问题,即:如果我要自己创建一个新的域名,那只能上线去执行 lnmp vhost add 的命令。
为什么要使用 lnmp 呢?其实他对我的作用只有一个,多版本的 PHP。因为现在在线上,各种不同版本的 PHP 都在跑,有 PHP5.6 / PHP7.1 / PHP8.1估计后面还会有更多的版本。
于是,我就想着用 expect 来处理
sudo /usr/bin/expect<<EOF
spawn lnmp vhost add
expect {
"Please enter domain" {send "{{$host}}\n";exp_continue}
"Enter more domain name" {send "\n";exp_continue}
"Please enter the directory" {send "\n";exp_continue}
"Allow Rewrite rule" {send "y\n";exp_continue}
"Default rewrite" {send "laravel\n";exp_continue}
"Enable PHP Pathinfo" {send "\n";exp_continue}
"Allow access log" {send "\n";exp_continue}
"Enable IPv6" {send "\n";exp_continue}
"Enter your choice " {send "\n";exp_continue}
"Add SSL Certificate" {send "\n";exp_continue}
"Press any key to start" {send "\r"; exp_continue}
}
expect eof
EOF
但执行后一直报错:
[mpass]: expect: spawn id exp3 not open
[mpass]: while executing
[mpass]: "expect eof"
仔细查了半天,原来最后一句还用了 exp_continue。。expect 认为还没有执行完。所以。就行报错了。
将最后一个 exp_contiue 删除。再次执行,就正常了
XML/HTML代码
- @task('lnmp' ,['on'=>'dev'])
-
- @if($force)
- sudo rm -rf /usr/local/nginx/conf/vhost/{{$host}}.conf
- sudo rm -rf /home/wwwroot/{{$host}}
- @endif
- sudo /usr/bin/expect<<EOF
- spawn lnmp vhost add
- expect {
- "Please enter domain" {send "{{$host}}\n";exp_continue}
- "Enter more domain name" {send "\n";exp_continue}
- "Please enter the directory" {send "\n";exp_continue}
- "Allow Rewrite rule" {send "y\n";exp_continue}
- "Default rewrite" {send "laravel\n";exp_continue}
- "Enable PHP Pathinfo" {send "\n";exp_continue}
- "Allow access log" {send "\n";exp_continue}
- "Enable IPv6" {send "\n";exp_continue}
- "Enter your choice " {send "\n";exp_continue}
- "Add SSL Certificate" {send "\n";exp_continue}
- "Press any key to start" {send "\r";}
- }
- expect eof
- EOF
- ls -lah /home/wwwroot/
- @endtask
这样就 OK 了