Czy można uzyskać efekt responsive(chodzi o skalowanie video) przy umiesczaniu na stronie video z YouTube, a jak ta to w jaki sposób?
Pozdrawiam Artur
bkrztuk wrote:Youtube embeed code contains static width/height declaration so there is no way to achieve this effect.
bkrztuk wrote:Sorry but I don't see on this page any video from youtube. Please just look at this embeed code there is specified width/height you can try to use width set to 100% but this is only an idea.
<iframe width="100%" height="315" src="http://www.youtube.com/embed/JX7167Nn0R4" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="http://www.youtube.com/embed/JX7167Nn0R4" frameborder="0" allowfullscreen></iframe>
bkrztuk wrote:I've tested this on our template and I really don't see a problem - please look at this :
http://d.pr/i/mhO9
http://d.pr/i/QcDF
http://d.pr/i/GsNl
please just use 100% width instead of value in px in embeed code so :
- Code: Select all
<iframe width="100%" height="315" src="http://www.youtube.com/embed/JX7167Nn0R4" frameborder="0" allowfullscreen></iframe>
instead of :
- Code: Select all
<iframe width="560" height="315" src="http://www.youtube.com/embed/JX7167Nn0R4" frameborder="0" allowfullscreen></iframe>
<iframe width="100%" height="100%" src="http://www.youtube.com/embed/JX7167Nn0R4" frameborder="0" allowfullscreen></iframe>