Comments (3)
Hi @ChristianFrisson.
Iām not sure if I had understood your request.
Could you make me a couple of examples of what you want to achieve?
Thanks
marcolago
from flowtime.js.
Hi @marcolago,
For example in your sample slides, section 5, page 2:
http://marcolago.github.io/flowtime.js/#/section-5/page-2
If the height of the window is lower than the height of the image, or if the width of the window is lower than the width of the image, the image is displayed as the maximum size it can get from the window and according to the aspect ratios of both window and image. However, if both width and height of the window are greater than respectively the width and height of the image, the image size stays fixed and doesn't fit the window.
I would like to have a similar behaviour as "fit to screen" for desktop wallpapers.
Thanks,
Christian
from flowtime.js.
Ok, understood.
To fit an image to the available space, like in the slide you linked, you have to edit the CSS rule .flowtime img
like this:
.flowtime img {
max-width: inherit;
max-height: inherit;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
This force the image to maximise itself and to maintain the aspect ratio cropping the parts that exceed the area.
If you want not to crop you can use object-fit: contain;
.
Please, mind that this solution may not work as expected in every situation depending on how you set the CSS on image containers.
Let me know if this solve your issue and if you need further help for a specific use case feel free to drop a line.
from flowtime.js.
Related Issues (20)
- Feature: Fragments hidden only when first time visiting HOT 5
- fullscreen for web browsers affects view HOT 11
- <sub> tag not working HOT 1
- View of nearby columns and differentiated # columns view HOT 2
- Please add build instructions HOT 2
- slidemote.js failing to load HOT 2
- Progress Indicator not working in examples HOT 5
- "Grid Navigation False Demo" is not doing what it claims to do HOT 1
- Features: Or directions for my fork
- npm installation HOT 1
- Wordpress and Flowtime HOT 1
- Hide that ugly URL - /#/2/2 HOT 1
- Loading D3.js HOT 5
- could you update broken link in description? HOT 1
- Is it possible that to display a long content to different pages? The long content includes HTML format text and base64 string. HOT 2
- Jump to top of the section by entering a number
- Its any simple way to make Dynamic Tree Structure? HOT 1
- Stacked images cycling HOT 1
- SlideCaptain links in README.md are dead HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowtime.js.