详细讲解修改allure报告自定义的logo和名称中文
一、 找到allure報告的安裝路徑:我的是在D盤:
D:\ruanjian\allure\allure-2.18.0\plugins\custom-logo-plugin\static
然后找到下圖位置,將需要的圖片放在這個文件夾里面,如果你們第一次進來是沒有的,可以命名為:allure——logo.jpg
?二、然后在修改取值文件信息,還是這個文件夾,修改styles.css文件
?
也可以修改圖片已經文字的大小,如圖所示
?
.side-nav__brand {
? background: url('allure_logo.jpg') no-repeat left center !important;
? margin-left: 10px;
? height: 50px;
? background-size: contain !important;
}
.side-nav__brand span{
? display: none;
}
.side-nav__brand:after{
? content: "XINXIN";
? margin-left: 20px;
}
如果content的值是中文的話,需要轉成unicode
可以參考:css里content使用中文亂碼,以及中文轉unicode怎么在css樣式里使用?_凱小默的博客-CSDN博客_content中文亂碼
三、然后點擊 config? ;在?打開 allure.yml? 加上? - custom-logo-plugin? ?,保存
?
?四、在運行allure就可以看到修改的logo和名稱了。
總結
以上是生活随笔為你收集整理的详细讲解修改allure报告自定义的logo和名称中文的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 手机BLE蓝牙通讯
- 下一篇: html游戏寻宝,达内:用scratch