TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Recreating the Reeder Two-tone Horizontal Rule in Pure CSS

11 pointsby recurserabout 12 years ago

3 comments

j4_jamesabout 12 years ago
Another way to achieve this effect:<p><pre><code> hr { background-image: linear-gradient(left,rgba(195,195,195,0),rgba(195,195,195,1),rgba(195,195,195,0)), linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1),rgba(255,255,255,0)); background-position:0 0,0 1px; background-repeat:no-repeat; background-size:100% 1px,100% 3px; border:0; height:4px; } </code></pre> Fallback is non-existent for browsers that don't support linear gradients, but it has the advantage of automatically working with any background color.<p>Not a criticism of the original solution - just offering an alternative approach to the problem.
tghwabout 12 years ago
Your font is particularly difficult to read. Chrome 26 on Win 7.<p><a href="http://i.imgur.com/kkGtESR.png" rel="nofollow">http://i.imgur.com/kkGtESR.png</a>
评论 #5507490 未加载
评论 #5507495 未加载
dz0nyabout 12 years ago
heh, <a href="http://www.daveperrett.com/articles/2014/04/07/recreating-the-reeder-two-tone-horizontal-rule-in-pure-css/" rel="nofollow">http://www.daveperrett.com/articles/2014/04/07/recreating-th...</a> massage from the future?
评论 #5507289 未加载