Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<div id="xx" style="bottom:20px;"></div>
の底値を取得するにはどうすればよいですか#xx
#xx
あなたは使用することができます
document.getElementById('xx').style.bottom;
文字列を取得します'20px'。
'20px'
数値として必要な場合は、解析する必要があります。
var nb = parseInt(document.getElementById('xx').style.bottom, 10);
jQuery の場合:
$('#xx').css('bottom');