如何制作容器行?
我是HTML的新手,仍在学习,但是我正在努力连接行和divs。
我正在尝试做这样的事情(下图)。我希望能够单击并转到某个链接。他们俩都必须彼此相邻,但都必须与自己的链接。我知道Float是正确的选择,但是我也可以使用网格吗?
我该怎么做?
非常感谢任何帮助,谢谢!
I'm fairly new to HTML and still learning, but I'm struggling with connecting rows and divs.
I'm trying to make something like this (picture below). I want to be able to make it clickable and go to a certain link. They both have to be next to each other, but with each their own link. I know float is the right option but can I use grid too?
How do I do this?
Any help is very much appreciated, thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
HTML
CSS
HTML
CSS
您必须在单个 col-6 类中占用两个 div ,每个> div 。在每个DIV中,您必须拍摄两张图像,而只是您的设计。
例如:
You have to take two two div with class of col-6 each in single div. In each div, you have to take two images and simply your design.
For example:
这是使用
flex
上的两列布局的基本示例,flex-basis:50%;
inflex-item
。Here is a basic example of a two column layout using a
flex
on the parent andflex-basis: 50%;
on eachflex-item
.使用2个孩子(
映像 - 容器,text-container
)我创建一个容器,并在
image-container
内 (图像网格
),在书籍将留下的4个相等框架中。比我给出的第二和第四个孩子的利润
I create a container and it has 2 childs (
image-container, text-container
)Inside
image-container
i use background image to cover the container and i created a grid container (image-grid
) which have 4 equal frame in it which the books will stay.Than i give 2nd and 4th childs margins