它决定自己工作。在我发布这个问题之前,我把钥匙改成了盒子。我检查了提交和之间的更改,但没有更改任何内容。
不管怎样,这就是它的样子,以防我错过了什么。
<AnimatePresence>
{modalOpen && (
<motion.div
key="box"
initial={{ y: "50%", opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.3, ease: "easeInOut" }}
exit={{ y: "50%", opacity: 0, transition: { duration: 0.3 } }}
className="absolute bottom-0 bg-white flex rounded-t-2xl w-[85%] h-[80%] border-[#26516eff] border-x-4 border-t-4"
>
<div className="flex flex-col mt-4 px-4 w-full">
<div className="flex justify-center align-middle self-end">
<button
className="createAnAccount-bg text-white rounded-full"
onClick={() => setModalOpen(false)}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="2.0rem"
height="2.0rem"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 13.4Z"
/>
</svg>
</button>
</div>
<h2 className="text-2xl mb-4">
Install this web app on your iPhone:
</h2>
{browserName === "safari" ? safariInstructions : chromeInstructions}
</div>
</motion.div>
)}
</AnimatePresence>
```