简体   繁体   English

固定大小框架中的div随机位置

[英]Random div position in fixed size frame

I have fixed size frame, in this frame there are some images with different size, it looks like this: 我有固定大小的框架,在此框架中有一些大小不同的图像,看起来像这样:

我的div

I want to show the images randomly or not in order. 我想随机显示图像或不按顺序显示图像。

If you want to show an image that covers the whole surface of the container you can use the css3 function cover . 如果要显示覆盖容器整个表面的图像,可以使用css3功能cover

Here an example: https://css-tricks.com/perfect-full-page-background-image/#article-header-id-0 这里是一个例子: https : //css-tricks.com/perfect-full-page-background-image/#article-header-id-0

Here the official documentation: http://www.w3schools.com/cssref/css3_pr_background-size.asp 这里是官方文档: http : //www.w3schools.com/cssref/css3_pr_background-size.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM