このように左端に戻るボタンがあっても、タイトルをセンターに表示したいときは下記でOK
戻るbuttonタグに
absolute
を付けるタイトルのh1タグの幅を
w-full
にする
1年以内の成婚率41.3%!
平均6.6ヶ月で婚約できるスマホの結婚相談所【naco-do】
<div className="flex top-0 sticky text-white"> <button type="button" className="absolute rounded-full text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5" > <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="stroke-2 w-6 h-6"> <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" /> </svg> <span className="sr-only">Back</span> </button> <h1 className="w-full text-center font-black text-3xl tracking-wider">ここがセンター</h1> </div>