jquery 实现有个可以文字聊天的智能助理效果代码

代码语言:html

所属分类:其他

代码描述:jquery 实现有个可以文字聊天的智能助理效果代码

代码标签: jquery 聊天 文字 助理

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html lang="en">

<head>

    <meta charset="UTF-8">


    <link href="https://fonts.googleapis.com/css?family=Lato:400,300,700" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.2.11.js"></script>

    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-ui-1.11.0.min.js"></script>


    <style>
        * {
          margin: 0;
          padding: 0;
          box-sizing: border-box;
        }
        #ad{
          font-size:15px;
          position:relative;
          bottom:-500px;
          font-color:#f9f9f9;
        }
        html,
        body {
          height: 100%;
          width: 100%;
          background: #e5e5e5;
          font: 20pt lato;
          font-weight: 200;
          position: absolute;
          top: 4px;
          float: left;
          overflow: hidden;
        }
        
        .wrapper {
          position: absolute;
          top: 50%;
          left: 50%;
          -webkit-transform: translateY(-50%) translateX(-50%);
          transform: translateY(-50%) translateX(-50%);
          display: block;
          height: 80px;
          width: 80px;
        }
        
        .loading-wrapper {
          position: relative;
          height: 100%;
          width: 100%;
        }
        
        .loading-wrapper .loader {
          height: 80px;
          width: 80px;
          border: 3px solid #fff;
          border-radius: 50%;
          -webkit-animation: pulse 1200ms ease-in-out;
          animation: pulse 1200ms ease-in-out;
          -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
        }
        
        .loading-wrapper .loader .inner {
          display: block;
          height: 40px;
          width: 40px;
          position: absolute;
          top: 50%;
          left: 50%;
          -webkit-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
          background: #30bdff;
          -webkit-transform-origin: 50% 50%;
          transform-origin: 50% 50%;
          border-radius: 50%;
          -webkit-animation: innerPulse 1200ms ease-in-out;
          animation: innerPulse 1200ms ease-in-out;
          -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
          -webkit-animation-delay: 600ms;
          animation-delay: 600ms;
          box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
        }
        
        @-webkit-keyframes pulse {
          0% {
            border: 3px solid #fff;
          }
          50% {
            border: 40px solid #fff;
          }
          100% {
            border: 3px solid #fff;
          }
        }
        
        @keyframes pulse {
          0% {
            border: 3px solid #fff;
          }
          50% {
            border: 40px solid #fff;
          }
          100% {
            border: 3px solid #fff;
          }
        }
        
        @-webkit-keyframes innerPulse {
          0% {
            height: 40px;
            width: 40px;
          }
          50% {
            height: 53.33333px;
            width: 53.33333px;
          }
          100% {
            height: 40px;
            width: 40px;
          }
        }
        
        @keyframes innerPulse {
          0% {
            height: 40px;
            width: 40px;
          }
          50% {
            height: 53.33333px;
            width: 53.33333px;
          }
          100% {
            height: 40px;
            width: 40px;
          }
        }
        
        .searchbar {
          position: absolute;
          top: 150px;
          width: 100%;
          border: none;
          height: 30px;
        }
        
        #respondbutton {
          border: 1px;
          padding: 3px;
          position: relative;
          left: 0px;
          color: #666666;
          font-weight: 200;
          background-color: white;
        }
        
        #say {
          border: 1px;
          padding: 3px;
          position: relative;
          left: 0px;
          color: #666666;
          width: 150px;
          font-weight: 200;
        }
        
        #response {
          color: #666666;
        }
        
        .avaliablesay {
          width: 50px;
          color: blue;
        }
        
        ) ui-id-1 {
          width: 10px;
          font-size: 6px;
        }
        
        
        /* Layout helpers
        ----------------------------------*/
        
        .ui-helper-hidden {
          display: none;
        }
        
        .ui-helper-hidden-accessible {
          border: 0;
          clip: rect(0 0 0 0);
          height: 1px;
          margin: -1px;
          overflow: hidden;
          padding: 0;
          position: absolute;
          width: 1px;
        }
        
        .ui-helper-reset {
          margin: 0;
          padding: 0;
          border: 0;
          outline: 0;
          line-height: 1.3;
          text-decoration: none;
          font-size: 40px;
          list-style: none;
        }
        
        .ui-helper-clearfix:before,
        .ui-helper-clearfix:after {
          content: "";
          display: table;
          border-collapse: collapse;
        }
        
        .ui-helper-clearfix:after {
          clear: both;
        }
        
        .ui-helper-clearfix {
          min-height: 0;
          /* support: IE7 */
        }
        
        .ui-helper-zfix {
          width: 100%;
          height: 100%;
          top: 0;
          left: 0;
          position: absolute;
          opacity: 0;
          filter: Alpha(Opacity=0);
          /* support: IE8 */
        }
        
        .ui-front {
          z-index: 100;
        }
        
        
        /* Interaction Cues
        ----------------------------------*/
        
        .ui-state-disabled {
          cursor: default !important;
        }
        
        
        /* Icons
        ----------------------------------*/
        
        
        /* states and images */
        
        .ui-icon {
          display: block;
          text-indent: -99999px;
          overflow: hidden;
          background-repeat: no-repeat;
        }
        
        
        /* Misc visuals
        ----------------------------------*/
        
        
        /* Overlays */
        
        .ui-widget-overlay {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
        }
        
        .ui-accordion .ui-accordion-header {
          display: block;
          cursor: pointer;
          position: relative;
          margin: 2px 0 0 0;
          padding: .5em .5em .5em .7em;
          min-height: 0;
          /* support: IE7 */
          font-size: 40px;
        }
        
        .ui-accordion .ui-accordion-icons {
          padding-left: 2.2em;
        }
        
        .ui-accordion .ui-accordion-icons .ui-accordion-icons {
          padding-left: 2.2em;
        }
        
        .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
          position: absolute;
          left: .5em;
          top: 50%;
          margin-top: -8px;
        }
        
        .ui-accordion .ui-accordion-content {
          padding: 1em 2.2em;
          border-top: 0;
          overflow: auto;
        }
        
        .ui-autocomplete {
          position: absolute;
          top: 0;
          left: 0;
          cursor: default;
        }
        
        .ui-button {
          display: inline-block;
          position: relative;
          padding: 0;
          line-height: normal;
          margin-right: .1em;
          cursor: pointer;
          vertical-align: middle;
          text-align: center;
          overflow: visible;
          /* removes extra width in IE */
        }
        
        .ui-button,
        .ui-button:link,
        .ui-button:visited,
        .ui-button:hover,
        .ui-button:active {
          text-decoration: none;
        }
        
        
        /* to make room for the icon, a width needs to be set here */
        
        .ui-button-icon-only {
          width: 2.2em;
        }
        
        
        /* button elements seem to need a little more width */
        
        button.ui-button-icon-only {
          width: 2.4em;
        }
        
        .ui-button-icons-only {
          width: 3.4em;
        }
        
        button.ui-button-icons-only {
          width: 3.7em;
        }
        
        
        /* button text element */
        
        .ui-button .ui-button-text {
          display: block;
          line-height: normal;
        }
        
        .ui-button-text-only .ui-button-text {
          padding: .4em 1em;
        }
        
        .ui-button-icon-only .ui-button-text,
        .ui-button-icons-only .ui-button-text {
          padding: .4em;
          text-indent: -9999999px;
        }
        
        .ui-button-text-icon-primary .ui-button-text,
        .ui-button-text-icons .ui-button-text {
          padding: .4em 1em .4em 2.1em;
        }
        
        .ui-button-text-icon-secondary .ui-button-text,
        .ui-button-text-icons .ui-button-text {
          padding: .4em 2.1em .4em 1em;
        }
        
        .ui-button-text-icons .ui-button-text {
          padding-left: 2.1em;
          padding-right: 2.1em;
        }
        
        
        /* no icon support for input elements, provide padding by default */
        
        input.ui-button {
          padding: .4em 1em;
        }
        
        
        /* button icon element(s) */
        
        .ui-button-icon-only .ui-icon,
        .ui-button-text-icon-primary .ui-icon,
        .ui-button-text-icon-secondary .ui-icon,
        .ui-button-text-icons .ui-icon,
        .ui-button-icons-only .ui-icon {
          position: absolute;
          top: 50%;
          margin-top: -8px;
        }
        
        .ui-button-icon-only .ui-icon {
          left: 50%;
          margin-left: -8px;
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0