div+css布局实现图片文字圆圈各分一半效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现图片文字圆圈各分一半效果代码
代码标签: div css 布局 图片 文字 圆圈 各分 一半
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { margin: 0; min-height: 100vh; font-family: Roboto, sans-serif; background-color: #f7f5f5; display: flex; align-items: center; justify-content: center; } * { box-sizing: border-box; } .container { width: 100%; max-width: 1600px; padding: 23px; display: grid; grid-template-columns: repeat(4, 350px); grid-auto-rows: 350px; grid-gap: 23px; justify-content: center; align-content: center; } .card-top, .card-right, .card-bottom, .card-left { display: flex; height: 350px; width: 350px; border-radius: 50%; box-shadow: 0px 2px 4px rgba(0, 10, 20, 0.1); background: white; overflow: hidden; } .card-top { flex-direction: column; } .card-right { flex-direction: row-reverse; } .card-bottom { flex-direction: column-reverse; } .card-left { flex-direction: row; } .card-image { display: flex; width: 50%; height: 50%; } .card-left .card-image, .card-right .card-image { width: 50%; height: 100%; } .card-top .card-image, .card-bottom .card-image { width: 100%; height: 50%; } .card-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; } .card-text { position: relative; display: flex; align-items: center; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0