如何消除css3斜切角引起的毛邊問題
問題描述
<!DOCTYPE html><html lang='en'><head> <meta charset='UTF-8'> <title>Title</title></head><body><style>.slide_bar { width: 180px; position: absolute; z-index: 99; right: 30px; top: 700px;}.slide_bar ul li a { display: block; width: 185px; height: 36px; line-height: 36px; text-align: center; font-size: 18px; color: #fff;}.slide_bar ul li:hover a { color: #0d1656;}.slide_bar ul li:nth-child(odd) { background: #588efd; background: linear-gradient(-70deg, transparent 12px, #588efd 0) right, linear-gradient(70deg, transparent 12px, #588efd 0) left; background-size: 50% 100%; background-repeat: no-repeat;}.slide_bar ul li:nth-child(even) { background: #52b8ff; background: linear-gradient(-110deg, transparent 12px, #52b8ff 0) right, linear-gradient(110deg, transparent 12px, #52b8ff 0) left; background-size: 50% 100%; background-repeat: no-repeat;}</style><p class='slide_bar'> <img src='http://www.intensediesel.com/wenda/5904.html' alt='導航圖'> <ul><li class='check_on'><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>咨詢老師</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>1</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>2</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>3</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>4</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>5</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>6</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'>7</a></li><li><a href='http://www.intensediesel.com/wenda/5904.html#K12_1'><i class='icon icon_top'></i>TOP</a></li> </ul></p></body></html>
使用css3的線性漸變實現多邊形邊框,斜切那部分會有毛邊,不是很美觀,請問怎么解決?css3 club斜切角文章
問題解答
回答1:猜測跟角度有關,這個應該是瀏覽器對小數的精度的控制造成的
這個切出來是無法修復的
相關文章:
1. javascript - 關于<a>元素與<input>元素的JS事件運行問題2. css3 - 純css實現點擊特效3. MySQL中的enum類型有什么優點?4. java - 為什么第一個線程已經釋放了鎖,第二個線程卻不行?5. mysql - 記得以前在哪里看過一個估算時間的網站6. javascript - vscode alt+shift+f 格式化js代碼,通不過eslint的代碼風格檢查怎么辦。。。7. 大家好,我想請問一下怎么做搜索欄能夠搜索到自己網站的內容。8. python - 啟動Eric6時報錯:’qscintilla_zh_CN’ could not be loaded9. html - vue項目中用到了elementUI問題10. mysql - 查詢字段做了索引為什么不起效,還有查詢一個月的時候數據都是全部出來的,如果分拆3次的話就沒問題,為什么呢。
