首页  >>  来自播客: The Tim Ferriss Show 更新   反馈

#715: Chris Beresford-Hill — A Master Ad Man on Superbowl Confessions, How to Come Up with Great Ideas, Cold Emailing Mark Cuban, Doing Naughty Things, Poetic Mind Control, Creative Process and Insider Tips, How to Negotiate with Bosses and Clients, and The Power of a Stolen Snickers

发布时间 2024-01-11 16:45:43    来源
您需要登陆,系统才能为您提取文字并进行中文翻译 (首页右上角可以用google账户登陆)



function setTranscriptHeight() { const transcriptDiv = document.querySelector('.transcript'); const rect = transcriptDiv.getBoundingClientRect(); const tranHeight = window.innerHeight - rect.top - 10; transcriptDiv.style.height = tranHeight + 'px'; if (false) { console.log('window.innerHeight', window.innerHeight); console.log('rect.top', rect.top); console.log('tranHeight', tranHeight); console.log('.transcript', document.querySelector('.transcript').getBoundingClientRect()) //console.log('.video', document.querySelector('.video').getBoundingClientRect()) console.log('.container', document.querySelector('.container').getBoundingClientRect()) } if (isMobileDevice()) { const videoDiv = document.querySelector('.video'); const videoRect = videoDiv.getBoundingClientRect(); videoDiv.style.position = 'fixed'; transcriptDiv.style.paddingTop = videoRect.bottom+'px'; } const videoDiv = document.querySelector('.video'); videoDiv.style.height = parseInt(videoDiv.getBoundingClientRect().width*390/640)+'px'; console.log('videoDiv', videoDiv.getBoundingClientRect()); console.log('videoDiv.style.height', videoDiv.style.height); } window.onload = function() { setTranscriptHeight(); }; if (!isMobileDevice()){ window.addEventListener('resize', setTranscriptHeight); }