cqfill实现一个容器查询拖动容器大小显示不同内容的效果代码
代码语言:html
所属分类:响应式
代码描述:cqfill实现一个容器查询拖动容器大小显示不同内容的效果代码
代码标签: 容器 查询 拖动 容器 大小 显示 不同 内容 的 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*,
*:after,
*:before {
box-sizing: border-box;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
overflow: hidden;
background: #405a6d;
}
.container {
contain: layout size;
--css-contain: layout size;
resize: both;
overflow: hidden;
position: relative;
min-height: 200px;
min-width: 200px;
max-height: 500px;
max-width: 500px;
}
.container:active .arrow {
display: none;
}
.arrow {
height: 30px;
width: 20px;
background: #fff;
position: absolute;
bottom: 15px;
right: 0;
transform-origin: 50% 100%;
transform: rotate(-15deg);
-webkit-clip-path: polygon(50% 100%, 100% 60%, 60% 60%, 65% 0, 35% .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0