1

Galera, mt boa noite. Tudo bem?

Minha dúvida é relativamente simples. Tenho um modal box de apresentação de um simples texto. Gostaria de utilizá-lo também para mostrar, assim que o usuário clicar num outro link, um campo de texto, em que poderá recuperar a senha esquecida do cadastro. Tal senha será enviada por e-mail.

A configuração do PHP eu consigo fazer tranquila, só fico na dúvida mesmo em utilizar corretamente o CSS.

Segue código:

<style>
/* CSS para modal box para visualização das regras */
.modalDialog {
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.modalDialog:target {
	opacity:1;
	pointer-events: auto;
}

.modalDialog > div {
	width: 400px;
	position: relative;
	margin: 10% auto;
	padding: 5px 20px 13px 20px;
	border-radius: 10px;
	background: #fff;
	background: -moz-linear-gradient(#999);
	background: -webkit-linear-gradient(#999);
	background: -o-linear-gradient(#999);
}
.close {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: -12px;
	text-align: center;
	top: -10px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-moz-box-shadow: 1px 1px 3px #000;
	-webkit-box-shadow: 1px 1px 3px #000;
	box-shadow: 1px 1px 3px #000;
}


/* CSS para envio da senha ("esqueceu sua senha?") */


</style>
<html>
 <head>
   </head>
<body>
  <table><tr><th>
     <a href="#openModal">regras</a>
          
      <div id="openModal" class="modalDialog">
        <div>
         <a href="#close" title="Fechar" class="close">X</a>
              <h2>Regras de Reserva</h2>
			  <p>Texto Simples</p> 
              </div>
          </div> </th></tr></table>
  
  Minha ideira era colocar mais um painel desse, porém com um <input type="text"> e um botão <input type="submit">. 
                                                        
  
</body>
</html>

<style>
/* CSS para modal box para visualização das regras */
.modalDialog {
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.modalDialog:target {
	opacity:1;
	pointer-events: auto;
}

.modalDialog > div {
	width: 400px;
	position: relative;
	margin: 10% auto;
	padding: 5px 20px 13px 20px;
	border-radius: 10px;
	background: #fff;
	background: -moz-linear-gradient(#999);
	background: -webkit-linear-gradient(#999);
	background: -o-linear-gradient(#999);
}
.close {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: -12px;
	text-align: center;
	top: -10px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-moz-box-shadow: 1px 1px 3px #000;
	-webkit-box-shadow: 1px 1px 3px #000;
	box-shadow: 1px 1px 3px #000;
}


/* CSS para envio da senha ("esqueceu sua senha?") */


</style>

Só não sei o motivo do código não ter rodado corretamente aí no painel.

Grande abs!

1 Resposta 1

1

Bom dia amigo! Pelo que entendi vc precisa fazer outra modal com o input e o botão de enviar, certo? Bem se for isso basta apenas usar o mesmo método, colocando o input e o botão dentro da modal.Segue o código:

.modalDialog {
  position: fixed;
  font-family: Arial, Helvetica, sans-serif;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.8);
  z-index: 99999;
  opacity:0;
  -webkit-transition: opacity 400ms ease-in;
  -moz-transition: opacity 400ms ease-in;
  transition: opacity 400ms ease-in;
  pointer-events: none;
}
.modalDialog:target {
  opacity:1;
  pointer-events: auto;
}
#openModal.show{
  opacity:1;
  pointer-events: auto;
}
.modalDialog > div {
  width: 400px;
  position: relative;
  margin: 10% auto;
  padding: 5px 20px 13px 20px;
  border-radius: 10px;
  background: #fff;
  background: -moz-linear-gradient(#999);
  background: -webkit-linear-gradient(#999);
  background: -o-linear-gradient(#999);
}
.close {
  background: #606061;
  color: #FFFFFF;
  line-height: 25px;
  position: absolute;
  right: -12px;
  text-align: center;
  top: -10px;
  width: 24px;
  text-decoration: none;
  font-weight: bold;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  -moz-box-shadow: 1px 1px 3px #000;
  -webkit-box-shadow: 1px 1px 3px #000;
  box-shadow: 1px 1px 3px #000;
}
<table>
    <tbody>
        <tr>
            <th>
                <a href="#openModal">regras</a>

                <div id="openModal" class="modalDialog">
                    <div>
                        <a href="#close" title="Fechar" id="closex" class="close">X</a>
                        <h2>Regras de Reserva</h2>
                        <p>Texto Simples</p>
                    </div>
                </div>
            </th>
        </tr>
    </tbody>
</table>


<table>
    <tbody>
        <tr>
            <th>
                <a href="#openModal2">modal2</a>

                <div id="openModal2" class="modalDialog">
                    <div>
                        <a href="#close" title="Fechar" id="closex" class="close">X</a>
                        <h2>Regras de Reserva</h2>
                        <p>Texto Simples</p>
                        <input type="text"> e um botão
                        <input type="submit">
                    </div>
                </div>
            </th>
        </tr>
    </tbody>
</table>

Aguardo pra saber se resolveu, abs!

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .