css时间线效果
代码语言:html
所属分类:布局界面
代码描述:css时间线效果
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /*- Screen Sizes*/ /*import fonts*/ @import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"); @import url("https://fonts.googleapis.com/css?family=Open+Sans"); @import url("https://fonts.googleapis.com/css?family=Oswald"); /*media queries*/ html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { background-color: #444444; font-family: "Open Sans", "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; font-size: 0.875em; color: #212121; line-height: 1.5; } .wrapper { margin: 3.125em auto; padding: 1em 5em 1em; max-width: 1000px; } h1 { color: white; font-family: "Open Sans", "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; text-align: center; } /* - &:nth-child(1) { grid-area: entry1; } - useful timesaver if there is a lengthy list */ .timeline { line-height: 1.5em; font-size: 14px; -webkit-transition: all .4s ease; transition: all .4s ease; position: relative; counter-reset: section; } .timeline:before { content: ""; width: 10px; height: 100%; background: #87ceeb; position: absolute; top: 0; left: -3.313em; border-radius: 40px 40px; } .timeline--entry { position: relative; background-color: #eeeeee; } .timeline--entry__title { color: white; background-color: #ec407a; font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif; font-weight: 300; font-size: 1rem; padding: 1em; } .timeline--entry__title:before { content: ""; display: inline-block; width: 1em; height: 1em; position: absolute; border-top: 10px solid transparent; border-bottom: 10px solid transparent; left: -1em; border-right: 10px solid #ec407a; } .timeline--entry__detail { background-color: #dddddd; padding: 1em; margin: 0; } .timeline--entry:before { content: ""; font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif; color: #ffffff; display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; width: 3em; height: 3em; background-color: #87ceeb; border: .2em solid white; border-radius: 50%; position: absolute; counter-increment: section; content: counter(section); text-shadow: 0 1px 0 #424242; left: -4.5em; } @supports (display: grid) { @media (min-width: 768px) { .timeline { displa.........完整代码请登录后点击上方下载按钮下载查看
网友评论0