clipboard.jsを使ってクリップボードにテキストをコピーするCSS記述 ※クリックするボタン(button)とコピーするテキストエリア(#dvtxt、input)のCSS記述です。必要に応じて変更して下さい。 <style> body{ padding: 0; margin: 0; text-align: center; font-size: 16px; } h1{ font-size:20px; line-height:1.6em; text-align:center; padding: 15px 0 25px 0; } #dvtxt{ font-size: 18px; } input{ padding: 8px; margin: 0 0 10px 0; width: 250px; margin: 0 auto; } button{ margin: 15px; padding:
![clipboard.jsを使ってクリップボードにテキストをコピーする方法|DAD UNION – エンジニア同盟](https://cdn-ak-scissors.b.st-hatena.com/image/square/2dbf5429c617bc069c878fcf04b16861c58cb494/height=288;version=1;width=512/https%3A%2F%2Fdad-union.com%2Fwp-content%2Fuploads%2F2023%2F06%2Fpic20230615.jpg)