V
V
Vell122016-06-19 01:04:52
JavaScript
Vell12, 2016-06-19 01:04:52

How to make such a line at the top of the site?

a95dfe6ef2a14c20be891603f0068e17.jpg

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Kairat Ubukulov, 2018-08-15
@ubukulov

1) _token should be sent in your form

<form action="javascript:void(null)" id="form" onsubmit="followPrice(this)" enctype="multipart/form-data" method="post">
                                {{ csrf_field() }}
                        	<input type="text" class="form-control" name="title" placeholder="Название"><br>
                        	<textarea class="form-control" rows="7" name="message" placeholder="Текст"></textarea><br>
                        	<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                        	<!-- <label for="inputFile">Картинка: </label>
                        	<input type="file" id="inputFile" ng-model="newData.image"><br> -->
                        	<input type="submit" class="btn btn-primary" value="Добавить">
                        </form>

потом в JS получаешь форму так:

<code lang="javascript">
function followPrice(form) {

    var data = $(form).serialize();

    $(form).find(".errors").html("");

    $.ajax({
        method: "POST",
        url: "/api/ajax/follow-price",
        data: data,
</code>

L
lemme, 2016-06-19
@lemme

How to make a hat?
In those answers - there is no such thing, well, you never know, another option;)

div {
  height: 1px;
  background-image: repeating-linear-gradient(to right,
    green 0, green 1em,
    purple 1em, purple 2em,
    tomato 2em, tomato 3em,
    blue 3em, blue 4em
  );
}

I
IceJOKER, 2016-06-19
@IceJOKER

draw the part that repeats ONCE and repeat horizontally.
in this case 5 colors are repeated

Z
zooks, 2016-06-19
@zooks

From a real project:

.wrapper {
    padding-top: 15px;
    background: url("img/bg-top.jpg") repeat-x center top;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question