Grupa: Viesis

UWM FORUMS · PORTFOLIO · VIETŅU TOP
JAUNĀKAIS FORUMĀ · BIEDRU SARAKSTS · INFO MEKLĒTĀJS · IZSEKOTĀS TĒMAS · NOBALSO


Ierakstus pievienot var tikai reģistrējies lietotājs!
  UWM AKTUĀLI: DISKUSIJA: Reputācijas restarts - DISKUSIJA: Steam spēļu izloze - NODERĪGI: "CW sistēma" uCoz modulī
  • Lappuse 1 no 1
  • 1
uWM // FORUMS » uWEBMEISTARS // WEBLAPU PLATFORMAS » WEBLAPU APLIKĀCIJAS, SKRIPTI, SPRAUDŅI » uCoz » Matereālu izskats ar baltu fonu kas daļēji nosedz bildi
Matereālu izskats ar baltu fonu kas daļēji nosedz bildi
Antikrists
Ceturtdiena, 26.10.2017, 4:09:38 | Ieraksts #1
FORUMA APSARGS
Foruma ieraksti: 599

UWM Reputācija:

uWEBMEISTARS ordeņi:

1. līmenis

2. līmenis

3. līmenis


Jaunākie apbalvojumi:


@Antikrists raksta .. :

Lejuplādē no pielikuma js failu, saglabā mapē js

Pec

Code
</ head>


Vajadzīgajā modulī galvenajā lapā liec

Code
<script src = "/js/snap.svg-min.js"> </ script>

<script>
   [].slice.call(document.querySelectorAll('#grid > a')).forEach(function (el) {
            var s = Snap(el.querySelector('svg')),
                path = s.select('path'),
                pathConfig = {
                    from: path.attr('d'),
                    to: el.getAttribute('data-path-hover')
                };

            el.addEventListener('mouseenter', function () {
                path.animate({
                    'path': pathConfig.to
                }, speed, easing);
            });

            el.addEventListener('mouseleave', function () {
                path.animate({
                    'path': pathConfig.from
                }, speed, easing);
            });
        });
    }
    init();
})();

</script>


Matrealu izskats

Code
<section id="grid" class="grid clearfix">
<a href="#" data-path-hover="m 0,0 0,47.7775 c 24.580441,3.12569 55.897012,-8.199417 90,-8.199417 34.10299,0 65.41956,11.325107 90,8.199417 L 180,0 z">
    <figure>
        <img src="http://bildites.lv/images/x88zp2z8/87006/original.jpg"width="200"height="300" />
        <svg viewBox="0 0 180 320" preserveAspectRatio="none">
            <path d="m 0,0 0,171.14385 c 24.580441,15.47138 55.897012,24.75772 90,24.75772 34.10299,0 65.41956,-9.28634 90,-24.75772 L 180,0 0,0 z"/>
        </svg>
        <figcaption><h2>UW 1</h2>
            <p>Policija atsūtīja manu mašīnas foto pārkāpjot ātrumu!
Es aizsūtīju foto ar soda naudu!</p>
        </figcaption>
    </figure>
</a>
    <a href="#" data-path-hover="m 0,0 0,47.7775 c 24.580441,3.12569 55.897012,-8.199417 90,-8.199417 34.10299,0 65.41956,11.325107 90,8.199417 L 180,0 z">
    <figure>
        <img src="http://bildites.lv/images/4krxns3g/87006/original.jpg" width="200"height="300" /> <svg viewBox="0 0 180 320" preserveAspectRatio="none">
            <path d="m 0,0 0,171.14385 c 24.580441,15.47138 55.897012,24.75772 90,24.75772 34.10299,0 65.41956,-9.28634 90,-24.75772 L 180,0 0,0 z"/>
        </svg>
        <figcaption>
            <h2>UW 2</h2>
            <p>- Vai jums tiešām jālaiza nazis?
- Es atvainojos, bet cilvēki bieži laiza nažus!
- Jā, bet ne jau operācijas laikā, dakter.</p>
        </figcaption>
    </figure>
</a>

</section>


Css

Code
body {
    background:#2f4067;
    margin:0px;
    padding:0px;
}
/* Common style */
.grid {
    margin: 10px;
    max-width: 1000px;
    width: 90%;
}
.grid a {
    float: left;
    max-width: 250px;
    width: 200px;
    color: #333;
    font-size: 13px;
}
.grid a:nth-child(odd) {
    margin: 0px;
}
.grid figure {
    position: relative;
    overflow: hidden;
    margin: 5px;
    background: #333;
}
.grid figure img {
    position: relative;
    display: block;
    width: 100%;
    opacity: 0.7;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}
.grid figcaption {
    position: absolute;
    top: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    text-align: center;
}
.grid figcaption h2 {
    margin: 0 0 20px 0;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
    font-size: 130%;
    -webkit-transition: -webkit-transform 0.3s;
    transition: transform 0.3s;
}
.grid figcaption p {
    padding: 0 20px;
    color: #aaa;
    font-weight: 300;
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
}
.grid figcaption h2, .grid figcaption p {
    -webkit-transform: translateY(50px);
    transform: translateY(50px);
}
.grid figure button {
    position: absolute;
    padding: 4px 20px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
}
.grid figcaption, .grid figcaption h2, .grid figcaption p, .grid figure button {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
/* Style for SVG */
.grid svg {
    position: absolute;
    top: -1px;
    /* fixes rendering issue in FF */
    z-index: 10;
    width: 100%;
    height: 100%;
}
.grid svg path {
    fill: #fff;
}
/* Hover effects */
.grid a:hover figure img {
    opacity: 1;
}
.grid a:hover figcaption h2, .grid a:hover figcaption p {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.grid a:hover figcaption p {
    opacity: 0;
}
/* Individual styles */
.demo-1 body {
    background: #3498db;
}
.demo-1 .grid figure button, .demo-3 .grid figure button {
    top: 50%;
    left: 50%;
    border: 3px solid #fff;
    background: transparent;
    color: #fff;
    opacity: 0;
    -webkit-transform: translateY(-50%) translateX(-50%) scale(0.25);
    transform: translateY(-50%) translateX(-50%) scale(0.25);
}
.demo-1 .grid a:hover figure button, .demo-3 .grid a:hover figure button {
    opacity: 1;
    -webkit-transform: translateY(-50%) translateX(-50%) scale(1);
    transform: translateY(-50%) translateX(-50%) scale(1);
}
.demo-2 body {
    background: #e74c3c;
}
.demo-2 .grid figcaption h2 {
    color: #e74c3c;
}
.demo-2 .grid figcaption p {
    -webkit-transition-delay: 0.05s;
    transition-delay: 0.05s;
}
.demo-2 .grid figure button {
    bottom: 0;
    left: 0;
    padding: 15px;
    width: 100%;
    background: #fff;
    color: #333;
    font-weight: 300;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
}
.demo-2 .grid a:hover figure button {
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.demo-2 .grid figcaption h2, .demo-2 .grid figcaption p, .demo-3 .grid figcaption h2, .demo-3 .grid figcaption p {
    -webkit-transition-timing-function: cubic-bezier(0.250, 0.250, 0.115, 1);
    /* older webkit */
    -webkit-transition-timing-function: cubic-bezier(0.250, 0.250, 0.115, 1.445);
    timing-function: cubic-bezier(0.250, 0.250, 0.115, 1.445);
}
.demo-2 .grid a:hover figcaption p, .demo-3 .grid a:hover figcaption p {
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
    -webkit-transition-duration: 0.1s;
    transition-duration: 0.1s;
}
.demo-3 body {
    background: #52be7f;
}
.demo-3 .grid figcaption h2 {
    color: #52be7f;
}
.demo-3 .grid a:hover figcaption h2 {
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
}


Bilžu vietā liec $IMG_URL1$

Iznākums

Pielikumi: snap.svg-min.js(65.4 Kb)



.
.


uWM // FORUMS » uWEBMEISTARS // WEBLAPU PLATFORMAS » WEBLAPU APLIKĀCIJAS, SKRIPTI, SPRAUDŅI » uCoz » Matereālu izskats ar baltu fonu kas daļēji nosedz bildi
  • Lappuse 1 no 1
  • 1
Meklēšana:

UWM apmeklēja:

RESPEKTABLĀKIE PORTĀLA FORUMA KLAVIATŪRISTI :
Foruma viszinis
Korijs
UWM karma: 379
Foruma atkarīgais
wuxmachine
UWM karma: 157
Foruma atkarīgais
Robiits
UWM karma: 87
Foruma šamanis
0wn3r
UWM karma: 80
Foruma atkarīgais
H[o_0]LiGaN
UWM karma: 78
Foruma atkarīgais
Spanky
UWM karma: 76
Foruma viszinis
Ar4ssS
UWM karma: 74
Foruma atkarīgais
Profth3tic
UWM karma: 55
Foruma atkarīgais
emciits
UWM karma: 52
Foruma atkarīgais
JackDaniel
UWM karma: 51
Foruma atkarīgais
Ken_D
UWM karma: 50
Foruma atkarīgais
Antikrists
UWM karma: 50
Ielāde...