Según [la documentación](https://sweetalert2.github.io/#configuration) necesitas indicar: - `target`: El elemento contenedor para agregar modal en. - `customClass`: Una clase `CSS` personalizada para el modal. ###Ejemplo: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function fire() { Swal.fire({ icon: 'success', title: 'Done', text: 'Request done', allowOutsideClick: false, backdrop: false, customClass: { container: 'swal2-container-position' }, target: document.getElementById('container') }); } <!-- language: lang-css --> .swal2-container.swal2-container-position { position: absolute; } .swal2-container.swal2-container-position > .swal2-modal { background-color: transparent; border: 0px; } body.swal2-no-backdrop .swal2-container.swal2-container-position>.swal2-modal{ box-shadow: none; } #container { position: relative; width: 400px; height: 400px; background-color: #eee; } <!-- language: lang-html --> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script> <button onClick="fire()">Lanzar</button> <div id="container"></div> <!-- end snippet -->